Hello,
While investigating an Airtime ticket about ALSA playout failing when a
USB audio interface is disconnected and reconnected:
http://dev.sourcefabric.org/browse/CC-2953
I found mention of a (perhaps) related Liquidsoap feature:
http://dev.sourcefabric.org/browse/LS-388
which enables Liquidsoap to recover after an ALSA error. This does not
seem to work when using Liquidsoap 1.0.1 if the error is due to USB
audio device disconnect/re-connect. Then, I get this error in the console:
Thread 4 killed on uncaught exception Alsa.Device_busy
when using the following test script:
#!/usr/bin/liquidsoap
set("log.file.path","/tmp/usb-disconnect.log")
radio = single("doggfather.ogg")
output.alsa(radio, device="hw:1,0")
where hw:1,0 is the USB audio device. I've attached the log output from
my Ubuntu Lucid test server to this email.
As USB is not a locking connector, this seems a pretty simple way to
screw up your broadcast :-) Is there some way we can have Liquidsoap
tolerate the disconnection/reconnection? Any and all tips would be welcome.
Cheers!
Daniel
2012/08/28 14:05:03 >>> LOG START
2012/08/28 14:05:03 [protocols.external:3] Didn't find "ufetch".
2012/08/28 14:05:03 [protocols.external:3] Found "/usr/bin/wget".
2012/08/28 14:05:03 [main:3] Liquidsoap 1.0.1
2012/08/28 14:05:03 [main:3] Using: graphics=[distributed with Ocaml] pcre=6.0.1 dtools=0.3.0 duppy=0.4.2 duppy.syntax=0.4.2 cry=0.2.2 mm=0.2.0 ogg=0.4.3 vorbis=0.6.1 mad=0.4.4 flac=0.1.1 flac.ogg=0.1.1 dynlink=[distributed with Ocaml] lame=0.3.1 alsa=0.2.1 ao=0.2.0 taglib=0.2.0 camomile=0.7.1 portaudio=0.2.0 pulseaudio=0.1.2
2012/08/28 14:05:03 [dynamic.loader:2] Could not load plugins in directory /usr/local/lib/liquidsoap/1.0.1/plugins.
2012/08/28 14:05:03 [decoder:3] Method "OGG" accepted "doggfather.ogg".
2012/08/28 14:05:03 [single:3] "doggfather.ogg" is static, resolving once for all...
2012/08/28 14:05:03 [frame:3] Using 44100Hz audio, 25Hz video, 44100Hz master.
2012/08/28 14:05:03 [frame:3] Frame size must be a multiple of 1764 ticks = 1764 audio samples = 1 video samples.
2012/08/28 14:05:03 [frame:3] Targetting 'frame.duration': 0.04s = 1764 audio samples = 1764 ticks.
2012/08/28 14:05:03 [frame:3] Frames last 0.04s = 1764 audio samples = 1 video samples = 1764 ticks.
2012/08/28 14:05:03 [threads:3] Created thread "generic queue #1".
2012/08/28 14:05:03 [threads:3] Created thread "generic queue #2".
2012/08/28 14:05:03 [doggfather(dot)ogg:3] Prepared "doggfather.ogg" (RID 0).
2012/08/28 14:05:03 [threads:3] Created thread "alsa_out(hw:1,0)" (1 total).
2012/08/28 14:05:03 [threads:3] Created thread "wallclock_alsa" (2 total).
2012/08/28 14:05:03 [clock.wallclock_alsa:3] Streaming loop starts, synchronized by active sources.
2012/08/28 14:05:03 [alsa_out(hw:1,0):3] Using ALSA 1.0.22.
2012/08/28 14:05:03 [alsa_out(hw:1,0):2] Falling back on interleaved S16LE
2012/08/28 14:05:03 [alsa_out(hw:1,0):3] Samplefreq=44100Hz, Bufsize=262144B, Frame=4B, Periods=1024
2012/08/28 14:05:16 [alsa_out(hw:1,0):2] Alsa error: Device or resource busy
2012/08/28 14:05:16 [threads:1] Thread "alsa_out(hw:1,0)" aborts with exception Alsa error: Device or resource busy!
2012/08/28 14:05:16 [threads:3] Raised by primitive operation at file "", line 0, characters 0-0
2012/08/28 14:05:16 [main:3] Shutdown started!
2012/08/28 14:05:16 [main:3] Waiting for threads to terminate...
2012/08/28 14:05:16 [doggfather(dot)ogg:3] Finished with "doggfather.ogg".
2012/08/28 14:05:16 [clock.wallclock_alsa:3] Streaming loop stopped.
2012/08/28 14:05:16 [threads:3] Thread "wallclock_alsa" terminated (0 remaining).
2012/08/28 14:05:16 [main:3] Cleaning downloaded files...
2012/08/28 14:05:16 >>> LOG END
------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and
threat landscape has changed and how IT managers can respond. Discussions
will include endpoint security, mobile security and the latest in malware
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
Savonet-users mailing list
Savonet-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/savonet-users