Two days ago I stumbled on this question and couldn't get it right. Eventually I read in AirBubble manual that RAOP is unsupported.
I finally solved it with DLNA/UPnP capabilities of pulseaudio. It works just like you would expect. You play sound with any app with pulseaudio output on your box and select the streaming output whenever you like to redirect it to your Android device.
First, install Rygel:
$ sudo apt-get install rygel rygel-preferences rygel-gst-launch
Then alter the file /etc/rygel.conf, so that the line with the parameter enable-transcoding looks like this:
enable-transcoding=false
Then load the DLNA and TCP modules and start rygel:
$ pactl load-module module-http-protocol-tcp
$ pactl load-module module-rygel-media-server
$ pactl load-module module-null-sink sink_name=upnp format=s16be channels=2 rate=44100 sink_properties="device.description='DLNA/UPnP Streaming' device.bus='network' device.icon_name='network-server'"
$ rygel
On your Android device download the app BubbleUPnP. Your pulseaudio output devices will be listed under the server "Sound on %HOSTNAME%". Direct the output on your computer to the DLNA device in sound preferences. Select the same output in BubbleUPnP.
Bear in mind that BubbleUPnP streams the first 30 minutes for free. The full version is 3,49€, but I guess it's worth the price. I didn't get any other app to work for me.
Finally, you can disable the media browser if you don't like it using rygel-preferences:
$ rygel-preferences
One more heads-up: this directly streams raw LPCM data, which is constantly ~250 kB/s. Any spurious WLAN activity will induce stuttering if you're on anything but an 802.11 n network. If you plan to base your entertainment solutions on wireless streaming, consider buying a wireless n router.
FOLLOW UP: TRANSCODING
To reduce network overhead and stuttering (which will happen unless you're on a 802.11 n network), it is possible to turn to transcoding the audio stream to mp3.
Paste this into ~/.config/rygel.conf
[GstLaunch]
enabled=true
launch-items=mypulseaudiosink
mypulseaudiosink-title=Sound on @HOSTNAME@
mypulseaudiosink-mime=audio/mpeg
mypulseaudiosink-launch=pulsesrc device=upnp.monitor ! lamemp3enc target=quality quality=6
Use the "Gst Launch" DLNA service which will now appear when you start rygel.
FOLLOW UP 2: FLAC
LAME can cause up to 2 minutes (!) of delay. FLAC on the other hand is pretty fast, normally clocking below one second. Change the lines in the above example to:
mypulseaudiosink-mime=audio/flac
mypulseaudiosink-launch=pulsesrc device=upnp.monitor ! flacenc quality=8
This reduces the stream to about 100 kB/s, allowing for smooth playback on most 802.11g networks with multiple users. I tested it while downloading a torrent. At full speed, there was some stuttering, but when I limited the download speed to around 200 kB/s below my maximum bandwidth, it was smooth again.
Plus, you have eliminated any loss in quality.
Couple of issues on the above - check and edit ~/.config/rygel.conf
instead, the /etc/.config/rygel.conf
if it isn't loaded by default (?).
The sink creation will not work on later Ubuntu versions.
What worked for me, however, is to follow all instructions (sans the sink creation). Then run paprefs
, and on the "Network server" tab, select the bottom option "Make local sound devices available as uPnP server" (and maybe the suboption is required as well).
Start rygel, and select the new "DLNA/UPnP Streaming" option in PulseAudio settings.
On BubbleUPnP select "Gst Launch" as Library. In the app, select Library and there should now be an option on the top called "Sound on ".