I'm trying to create a Bluetooth A2DP sink (receiver) then output the audio to a vorbis radio stream (LAN only). Basically I want this as a bluetooth add-on to a squeezebox (squeezelite) multi-room music system. The A2DP-sink-radio-transmitter is a standalone Raspberry Pi that can be added to any system easily. I'm relatively new to Linux.
I HAVE already achieved a working setup, but it all falls over when I pause Audio on the bluetooth source (phone).
The Setup: Bluetooth Phone -> Received by Bluez/PulseAudio [PA] -> PulseAudio Bluez Source through a PA 'module-loopback' to ALSA audio card Sink -> Darkice to encode vorbis stream using pulseaudio as source (device = pulse) -> icecast2 to broadcast
This works well but when I pause the phone the stream (as received by VLC/Squeezebox) STOPS (time stamp stops ticking). Resuming the audio gives a huge latency (I think it's the same length as the pause duration). After long pauses the stream can fail to restart. Darkice is clearly seeing that the audio input has stopped.
I think I need to tell PulseAudio to fill the pause with some silence somehow. I've tried routing through an ALSA dummy (snd-dummy), this just gave constant noise. I couldn't get jackd to work.
Darkice can take the following sources: OSS, ALSA and JACK.
Please help, I'm sooooo close!