Hi Frank,
Thanks for the quick reply! Although it didn't quite work, it pointed me in the right direction.
Uncommenting the following line in the wrk_stopAirplay function changed the behaviour back to the way it was on the RPi.
// sendMpdCommand($sock, 'pause');
The last line in the code clipping below:
function wrk_stopAirplay($redis)
{
...
...
if ($stoppedPlayer !== '') {
// we previously stopped playback of one player to use the Airport Stream
if ($stoppedPlayer === 'MPD') {
// connect to MPD daemon
$sock = openMpdSocket('/run/mpd.sock', 0);
$status = _parseStatusResponse(MpdStatus($sock));
runelog('MPD status', $status);
if ($status['state'] === 'pause') {
// clear the stopped player if we left MPD paused
$redis->set('stoppedPlayer', '');
}
sendMpdCommand($sock, 'pause');
...
...
Now when the AirPlay source is paused (or disabled altogether), the MPD source that was paused/locked will continue playing again where it left off. Great!
Thanks again for all the great work! I'm really loving Rune Audio and looking forward to future releases.
Best regards,
Mike.