[Pianod] Music doesn't start when launched at startup
Jimmy Pop
jimmypopali96 at gmail.com
Tue May 7 08:44:46 PDT 2013
Once I get home I'll whip an init.d file together for him, I am at work
now.
Want a pi Perette? I'll ship you one.
James Wynhoff
Fuzion3
CA/NV Control4 Platinum Dealer
Web: www.Fuzion3lv.com
Cell: 702-587-4916
On May 7, 2013, at 8:41 AM, Perette Barella <perette at barella.org> wrote:
I expect libao builds the driver list during initialize, so you probably
need to shutdown/reinitialize in your loop:
ao_initialize();
x = ao_default_driver_id();
while (x<0) {
print failure message
+ ao_shutdown()
sleep a bit
+ ao_initialize()
x = ao_default_driver_id();
}
I don't have a transcript handy for version 144, but with the changes
discussed earlier I get similar output except there is a 500 error on
playback.
That would be the Player Error message, so it's definite the player thread
is exiting with failure.
I'm in the Mac world, so I'm not sure about redirecting from init.d
scripts... but that's a good idea, to see if anything else is getting
logged from the player thread before it dies. Anyone?
Perette
On May 7, 2013, at 7:17 AM, "pi.gonewest at xoxy.net" <pi.gonewest at xoxy.net>
wrote:
Hi Perette, actually I tried that change last night but it had no effect.
Pianod continues to start in some inconsistent state, giving me internal
error 500 whenever I ask to play a station. Stopping and starting the
pianod service always fixes this.
I tried adding an early ao_default_driver_id() test up in main(). In
pseudo code what I added was something like:
ao_initialize();
x = ao_default_driver_id();
while (x<0) {
print failure message
sleep a bit
x = ao_default_driver_id();
}
On the theory that I could just wait until the default device was
available. But this code didn't make any difference.
I implemented a command "reset audio" with the idea that, if the audio is
in some inconsistent state I could use this command to manually reset, eg
ao_shutdown();
ao_initialize();
But this didn't work either.
One thing I cannot figure out is how to redirect stderr and stdio to a file
in that init.d script... A little help on that would be much appreciated
and probably help everyone involved. Thanks!
_______________________________________________
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/bc4693dc/attachment-0002.htm>
More information about the Pianod
mailing list