Closed hplato closed 9 years ago
Hi there. Thanks for the interesting post. To be honest, I don't think there it would be a good fit for Shairport Sync to act as a mixer. A better way might be to make Shairport Sync play properly with Pulseaudio. There is a pulseaudio back end, but it uses the "simple" APIs and is, IMHO, incapable of working properly – it would require the use of the full APIs and perhaps a structural change to Shairport Sync itself to do "approximate" synchronisation. But if it worked, you could use pulseaudio's facilities to include mixers.
Hey Mike, Thanks for the reply.
I didn't think it would work, but thought I'd ask anyways. I'll try pulse to see if that might work.
One other thought, is there any way to pause and then restart the stream from a command line? Just wondering if there is anything in the shairport-sync area that might achieve the same result.
I experimented with this some time back, and I never got it working properly; to get it to work it would required Shairport Sync to rely exclusively on Avahi. However, the metadata includes an ID for the audio source. So, a metadata reader could use that to find the source and then send a pause / resume command to it. In practice it's a bit tricky because you have to parse some mDNS packets, with e.g. Avahi, to identify the IP number and port number to identify the source.
Well, it looks like pulse might be the only way forward. Heard back from the alsa folks that dmix isn't being worked on as it requires shared buffer memory support from the kernel
Haven't had much success with pulse yet, can't get the bluetooth device seen as a sink after a few hours of trying.
Gonna close this issue now -- please feel free to reopen if there are developments.
OK, thanks for answering mike. I've got pulse audio mixing to the bluetooth speakers, but audio only works for 2-3 minutes before it disconnects and I have to restart pulse audio. So close but so far...
This isn't an issue, but more of a question to see if there are any other ideas.
I'm using shairport 1.0 on my linux server. I use a dmix alsa device, so that I can also mix in a process that occasionally plays .wav files (for annoucements). This works great.
Now, to expand out my house audio, I picked up some weatherproof bluetooth speakers and a raspberry PI. I've successfully got shairport-sync to play to these speakers! However, after a few days of troubleshooting and searching, it looks like the alsa dmix type doesn't work with bluetooth, so I can't play any wav files if shairport-sync is active.
So if hardware/alsa is an issue, I'm wondering if there is anything that I can do at the shairport-sync level. Is it possible to play a wav file via a command line client and shairport-sync will mix it in? Can I output to a pipe that is streamed to the hardware device and somehow mix in a wav file?
I'll post to the alsa list to see if there are any plans to dmix in bluetooth, however I'm not holding out hope for that. I also thought I'd look into pulseaudio to see if that might work.