markmcconnell / mai

Mark's AES67 Implementation
BSD 3-Clause "New" or "Revised" License
95 stars 22 forks source link

How to actually run it though? #3

Open kenshowler opened 5 years ago

kenshowler commented 5 years ago

Hi Mark, I was able to compile it after ignoring the fallthrough warnings... but then how do I actually use it ? Any direction appreciated, thanks!

keygee commented 4 years ago

Hi, I know it's a very old post, but maybe my tests could be useful for someone...

first of all, install linuxptp on a third machine in the LAN ( I use a raspberry PI3 for that), and run it with this command:

ptp4l -S -i eth0

Then, on the sender machine, modify your /etc/asound.conf like this:

pcm.!default CH12

pcm.rawjack {
    type jack
    playback_ports {
        0 mai:in_1
        1 mai:in_2
    }
}

pcm.CH12 {
    type plug
    slave { pcm "rawjack" }
    hint {
        description "JACK Audio Connection Kit"
    }
    ttable.0.0 1
    ttable.1.1 1
}

run jack with this command:

jackd -d dummy -p 512 -C 0 -P 0 &

cd to mai directory and run:

./mai -i eth0 -m send -a 239.1.4.1 -s sess1 -b 24 -r 48000 -c 2 -p 1000 -v &

then start your audio file with:

aplay audio_file_48KHz_24bit.wav

on the receiver machine, run jack with this command:

jackd -d alsa -o 2 -p 196 -n1 &

cd to mai directory and run:

./mai -m recv -i eth0 -a 239.1.4.1 -s sess1 -b 24 -r 48000 -c 2 -p 1000 -v &

finally, connect the mai termination with your card:

jack_connect mai:out_1 system:playback_1
jack_connect mai:out_2 system:playback_2

ciao

Guido

PiecePaperCode commented 3 years ago

this should be a script that starts up when we try to run your programm. Server.sh Client.sh