[Pianod] Music doesn't start when launched at startup
pi.gonewest at xoxy.net
pi.gonewest at xoxy.net
Mon May 6 22:00:50 PDT 2013
Chinasaur and I have been discussing this same issue on the Raspberry Pi
forums. (
http://www.raspberrypi.org/phpBB3/viewtopic.php?f=35&t=37494&p=344130#p344130
)
In my case if I setup pianod to play immediately upon launching it fails,
but if I immediately restart the service without changing anything else
playback works fine. My thought is the daemon is trying to play before the
audio driver is completely ready.
So I'm going to try two things:
(1) remove the "play" command from my startscript. Looks to me like pianod
doesn't try opening a playback channel until it needs to play a song, so if
I boot with pianod in an idle state then I can choose how long to wait
before selecting a station.
(2) change the player logic. BarPlayerOpenAudioOut(). The function calls
if (audioOutDriver < 0) {
audioOutDriver = ao_default_driver_id();
}
but according to the libao documentation, ao_default_driver_id() can return
-1 if there is no usable audio output device. There's some logic that
assumes it's possible to fall back to a "default" device but in my case I'm
already using the default. I want to see if there's some way to detect
this case and fail more gracefully, e.g. pause and retry or something along
those lines.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.deviousfish.com/pipermail/pianod-deviousfish.com/attachments/20130506/69bce706/attachment-0003.htm>
More information about the Pianod
mailing list