philippe44 / libraop

RAOP player and library (AirPlay)
97 stars 32 forks source link

send synchronous audio to multiple players example #17

Closed NebzHB closed 4 years ago

NebzHB commented 5 years ago

Hello,

Could you give example how to do that ?

Thank you

philippe44 commented 5 years ago

You have to launch multiple instances and have them start at a given time. So for example, first get the current NTP (using -ntp) and then launch all instances you want using that NTP + N, where N is large enough so that all instances have started (maybe 1 or 2 sec). I've never used it that way, as said before, this application is just a test for the library. The synchronization of the library works, I'm using it everyday, but in another application I also tested a while ago that the NTP start time for one playerworks, but that's all I did

NebzHB commented 5 years ago

Mmm ok I'll try and post a working example here

philippe44 commented 5 years ago

For example, I think the following works (in Linux):

raop_play -ntp start.ntp

raop_play -ntp start.ntp -w 2000 192.168.0.10 audio.pcm& raop_play -ntp start.ntp -w 2000 192.168.0.11 audio.pcm& raop_play -ntp start.ntp -w 2000 192.168.0.12 audio.pcm&

NebzHB commented 5 years ago

oh thank you !!!

from what i understood it was : raop_play -nf start.ntp -w 2000 ....

typo or i misunderstood ?

philippe44 commented 5 years ago

oh yes, sorry, wrong copy/paste. -ntp is only the 1st line to get the NTP