Skip to content
PeteManchester edited this page Jun 12, 2014 · 4 revisions

MediaPlayer supports the Apple AirPlay stream.

The additional config options for the AirPlay in the app.properties file are:

java_soundcard_suffix=[PLUGHW:0,0]--PRIMARY SOUND DRIVER  
airplay_enabled=true
airplay_port=5002

The AirPlay Receiver uses a Java Sound Player, which is used just for the Songcast and Airplay receivers, all other channels still use either MPD or mplayer. By default the AirPlay Receiver will output the sound to the Headphone socket and so this option can be used to direct the audio output to a DAC, this has only been tested with USB DACs but should also work with I2C DACs.

At startup MediaPlayer will write the name of the available Audio Devices to the log file, for example:

2014-03-07 16:46:40,224 [main] INFO  [org.rpi.main.StartMe] Available Audio Devices:
2014-03-07 16:46:40,430 [main] INFO  [org.rpi.main.StartMe] 'ALSA [default]'
2014-03-07 16:46:40,431 [main] INFO  [org.rpi.main.StartMe] 'ALSA [plughw:0,0]'
2014-03-07 16:46:40,432 [main] INFO  [org.rpi.main.StartMe] 'UD110v2 [plughw:1,0]'
2014-03-07 16:46:40,432 [main] INFO  [org.rpi.main.StartMe] 'Port ALSA [hw:0]'
2014-03-07 16:46:40,434 [main] INFO  [org.rpi.main.StartMe] 'Port UD110v2 [hw:1]'
2014-03-07 16:46:40,434 [main] INFO  [org.rpi.main.StartMe] End Of Audio Devices

The active device on linux is usually the one that ends with [plughw:0,0] as configured in the option 'java_soundcard_suffix'

The option airplay_port is used to set the port used by the AirPlay receiver.

The option airplay_latency_enabled if enabled will add a 2 second delay in playing the audio.

Due to the high CPU requirements of AirPlay unfortunately there is no logic to synchronise the AirPlay stream and so if watching a video whiilst listening to AirPlay the sound will be out of sync.