views:

222

answers:

0

In LiquidSoap it's possible to either preload all audio values, or to have them load each time they are requested using request.dynamic. When I attempt to use request.dynamic and load liquidSoap as a daemon it hangs when trying to process the file, but works if I use the static loading methods. Sample code follows.

Essentially it seems that when dynamic code is running in daemon mode, it gets as far as selecting the decoder and hangs.

I'm running under Ubuntu 4.3.3-5ubuntu4, with LiquidSoap version 0.9.0

Static code works in all cases:

  set("log.file.path", "/tmp/static.log")
  output.file.mp3("/tmp/staticTest.mp3", mksafe(single("say:Hello Static World")))

Dynamic code only works when loaded directly into the shell, not when run as a daemon:

  set("log.file.path", "/tmp/dynamic.log")
  output.file.mp3("/tmp/dynamicTest.mp3", mksafe(request.dynamic({request.create("say:Hello dynamic world")})))

Logs from Dynamic when not in daemon mode:

  2009/05/18 02:51:55 >>> LOG START
  2009/05/18 02:51:55 [protocols.external:3] Didn't find "ufetch"
  2009/05/18 02:51:55 [protocols.external:3] Found "/usr/bin/wget"
  2009/05/18 02:51:55 [main:3] Liquidsoap 0.9.0
  2009/05/18 02:51:55 [threads:3] Created thread "generic queue #1".
  2009/05/18 02:51:55 [root:3] Waking up active nodes...
  2009/05/18 02:51:55 [threads:3] Created thread "root" (1 total).
  2009/05/18 02:51:55 [root:3] Broadcast starts up!
  2009/05/18 02:51:55 [protocols.say:3] Synthetizing "Hello dynamic world" to "/tmp/say55b73c.wav"
  2009/05/18 02:51:55 [mksafe:3] Switch to safe_blank.
  2009/05/18 02:51:56 [decoder:3] Decoder WAV chosed for "/tmp/say55b73c.wav"
  2009/05/18 02:51:57 [src_4703:3] Prepared "/tmp/say55b73c.wav" -- rid 0
  2009/05/18 02:51:57 [protocols.say:3] Synthetizing "Hello dynamic world" to "/tmp/say03fa99.wav"
  2009/05/18 02:51:57 [mksafe:3] Switch to src_4703 with transition.
  2009/05/18 02:51:57 [root:2] We must catchup 1.13 seconds!
  (repeated data removed)
  2009/05/18 02:52:04 [src_4703:3] Prepared "/tmp/say71b4ce.wav" -- rid 4
  2009/05/18 02:52:04 [main:3] Shutdown started!
  2009/05/18 02:52:04 [main:3] Waiting for threads to terminate...
  2009/05/18 02:52:04 [protocols.say:3] Synthetizing "Hello dynamic world" to "/tmp/say5a623c.wav"
  2009/05/18 02:52:04 [root:3] Shutting down sources...
  2009/05/18 02:52:05 [decoder:3] Decoder WAV chosed for "/tmp/say5a623c.wav"
  2009/05/18 02:52:06 [src_4703:3] Finished with "/tmp/say71b4ce.wav"
  2009/05/18 02:52:06 [threads:3] Thread "root" exited (0 remaining).
  2009/05/18 02:52:06 [main:3] Cleaning downloaded files...
  2009/05/18 02:52:06 [protocols.say:3] Synthetizing "Hello dynamic world" to "/tmp/say2a79fb.wav"
  2009/05/18 02:52:06 >>> LOG END

Logs from Dynamic when in daemon mode:

  2009/05/18 03:09:30 [protocols.external:3] Found "/usr/bin/wget"
  2009/05/18 03:09:30 [main:3] Liquidsoap 0.9.0
  2009/05/18 03:09:30 [threads:3] Created thread "non-blocking queue #1".
  2009/05/18 03:09:30 [threads:3] Created thread "generic queue #1".
  2009/05/18 03:09:30 [root:3] Waking up active nodes...
  2009/05/18 03:09:30 [threads:3] Created thread "root" (1 total).
  2009/05/18 03:09:30 [root:3] Broadcast starts up!
  2009/05/18 03:09:30 [protocols.say:3] Synthetizing "Hello dynamic world" to "/tmp/saycb9c37.wav"
  2009/05/18 03:09:30 [mksafe:3] Switch to safe_blank.
  2009/05/18 03:09:32 [decoder:3] Decoder WAV chosed for "/tmp/saycb9c37.wav"