[Pianod] Music doesn't start when launched at startup
Perette Barella
perette at barella.org
Tue May 7 05:19:51 PDT 2013
Hi guys,
You're right about the ao_default_driver_id.
if (audioOutDriver < 0) {
audioOutDriver = ao_default_driver_id();
+ if (audioOutDriver < 0) {
+ BarUiMsg (player->settings, MSG_ERR, "No audio driver available\n");
+ return NULL;
+ }
}
But if taking the play out of the startscript didn't work for GoneWest, there must be something more. Is it dropping a core? If you ./configure --enable-debug, it compiles with -g and you should get core dumps suitable for loading into GDB to find out exactly where it's dying.
Perette
On 2013年05月07日, at 1:00, pi.gonewest at xoxy.net wrote:
>
> 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.
>
>
>
> _______________________________________________
> Pianod mailing list
> Pianod at lists.deviousfish.com
> http://lists.deviousfish.com/listinfo.cgi/pianod-deviousfish.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.deviousfish.com/pipermail/pianod-deviousfish.com/attachments/20130507/228e3a9d/attachment-0003.htm>
More information about the Pianod
mailing list