Hi!

Oh my, I missed this. Let's move all the discussion there:
  https://github.com/savonet/liquidsoap/issues/46

Romain

2013/3/23 mcquiggi <mcqui...@me.com>:
> Hi Again:
>
> Here is my log file for the demo program, I think it will complement my 
> original message:
>
> 2013/03/23 14:38:14 >>> LOG START
> 2013/03/23 14:38:14 [protocols.external:3] Found "/usr/bin/wget".
> 2013/03/23 14:38:14 [main:3] Liquidsoap 1.1.0+scm 
> (git://github.com/savonet/liquidsoap.git@0836328521658f193caeddbbabad4495a3acd701:20130317:173625)
> 2013/03/23 14:38:14 [main:3] Using: graphics=[distributed with Ocaml] 
> pcre=6.2.5 dtools=0.3.0 duppy=0.4.2 duppy.syntax=0.4.2 cry=0.2.2 mm=0.2.1 
> xmlplaylist=0.1.3 ogg=0.4.4 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.3.0 
> camomile=0.8.4 faad=0.3.2 portaudio=0.2.0 pulseaudio=0.1.2 ladspa=0.1.4 
> camlimages=4.0.0
> 2013/03/23 14:38:14 [main:2]
> 2013/03/23 14:38:14 [main:2] DISCLAIMER: This version of Liquidsoap has been
> 2013/03/23 14:38:14 [main:2] compiled from a snapshot of the development code.
> 2013/03/23 14:38:14 [main:2] As such, it should not be used in production
> 2013/03/23 14:38:14 [main:2] unless you know what you are doing!
> 2013/03/23 14:38:14 [main:2]
> 2013/03/23 14:38:14 [main:2] We are, however, very interested in any feedback
> 2013/03/23 14:38:14 [main:2] about our development code and committed to fix
> 2013/03/23 14:38:14 [main:2] issues as soon as possible.
> 2013/03/23 14:38:14 [main:2]
> 2013/03/23 14:38:14 [main:2] If you are interested in collaborating to
> 2013/03/23 14:38:14 [main:2] the development of Liquidsoap, feel free to
> 2013/03/23 14:38:14 [main:2] drop us a mail at <savonet-d...@lists.sf.net>
> 2013/03/23 14:38:14 [main:2] or to join the #savonet IRC channel on Freenode.
> 2013/03/23 14:38:14 [main:2]
> 2013/03/23 14:38:14 [main:2] Please send any bug report or feature request
> 2013/03/23 14:38:14 [main:2] at 
> <https://github.com/savonet/liquidsoap/issues>.
> 2013/03/23 14:38:14 [main:2]
> 2013/03/23 14:38:14 [main:2] We hope you enjoy this snapshot build of 
> Liquidsoap!
> 2013/03/23 14:38:14 [main:2]
> 2013/03/23 14:38:14 [dynamic.loader:3] Could not find dynamic module for 
> aacplus encoder.
> 2013/03/23 14:38:14 [frame:3] Using 44100Hz audio, 25Hz video, 44100Hz master.
> 2013/03/23 14:38:14 [frame:3] Frame size must be a multiple of 1764 ticks = 
> 1764 audio samples = 1 video samples.
> 2013/03/23 14:38:14 [frame:3] Targetting 'frame.duration': 0.04s = 1764 audio 
> samples = 1764 ticks.
> 2013/03/23 14:38:14 [frame:3] Frames last 0.04s = 1764 audio samples = 1 
> video samples = 1764 ticks.
> 2013/03/23 14:38:14 [threads:3] Created thread "generic queue #1".
> 2013/03/23 14:38:14 [threads:3] Created thread "generic queue #2".
> 2013/03/23 14:38:14 [test(dot)pls:3] Loading playlist...
> 2013/03/23 14:38:14 [test(dot)pls:3] No mime type specified, trying 
> autodetection.
> 2013/03/23 14:38:14 [test(dot)pls:3] Playlist treated as format audio/mpegurl
> 2013/03/23 14:38:14 [decoder:3] Method "OGG" accepted 
> "/home/kevin/radio/content/test/a.ogg".
> 2013/03/23 14:38:14 [decoder:3] Method "OGG" accepted 
> "/home/kevin/radio/content/test/b.ogg".
> 2013/03/23 14:38:14 [decoder:3] Method "OGG" accepted 
> "/home/kevin/radio/content/test/c.ogg".
> 2013/03/23 14:38:14 [decoder:3] Method "OGG" accepted 
> "/home/kevin/radio/content/test/d.ogg".
> 2013/03/23 14:38:15 [test(dot)pls:3] Successfully loaded a playlist of 4 
> tracks.
> 2013/03/23 14:38:15 [vorbis-dev:3] Connecting mount vorbis-dev for 
> source@localhost...
> 2013/03/23 14:38:15 [vorbis-dev:3] Connection setup was successful.
> 2013/03/23 14:38:15 [mp3-dev:3] Connecting mount mp3-dev for 
> source@localhost...
> 2013/03/23 14:38:15 [mp3-dev:3] Connection setup was successful.
> 2013/03/23 14:38:15 [threads:3] Created thread "wallclock_main" (1 total).
> 2013/03/23 14:38:15 [clock.wallclock_main:3] Streaming loop starts, 
> synchronized with wallclock.
> 2013/03/23 14:38:15 [mksafe:3] Switch to safe_blank.
> 2013/03/23 14:38:30 [decoder:3] Method "OGG" accepted 
> "/home/kevin/radio/content/test/a.ogg".
> 2013/03/23 14:38:30 [test(dot)pls:3] Prepared 
> "/home/kevin/radio/content/test/a.ogg" (RID 5).
> 2013/03/23 14:38:30 [mksafe:3] Switch to switch_5237 with transition.
> 2013/03/23 14:38:30 [switch_5237:3] Switch to sequence_5235.
> 2013/03/23 14:38:30 [test(dot)pls:3] Finished with 
> "/home/kevin/radio/content/test/a.ogg".
> 2013/03/23 14:38:31 [decoder:3] Method "OGG" accepted 
> "/home/kevin/radio/content/test/b.ogg".
> 2013/03/23 14:38:31 [test(dot)pls:3] Prepared 
> "/home/kevin/radio/content/test/b.ogg" (RID 6).
> 2013/03/23 14:38:31 [test(dot)pls:3] Finished with 
> "/home/kevin/radio/content/test/b.ogg".
> 2013/03/23 14:38:31 [mksafe:3] Switch to safe_blank with forgetful transition.
> 2013/03/23 14:39:00 [mksafe:3] Switch to switch_5237 with transition.
> 2013/03/23 14:39:00 [switch_5237:3] Switch to sequence_5235.
> 2013/03/23 14:39:00 [decoder:3] Method "OGG" accepted 
> "/home/kevin/radio/content/test/c.ogg".
> 2013/03/23 14:39:00 [test(dot)pls:3] Prepared 
> "/home/kevin/radio/content/test/c.ogg" (RID 7).
> 2013/03/23 14:39:01 [test(dot)pls:3] Finished with 
> "/home/kevin/radio/content/test/c.ogg".
> 2013/03/23 14:39:01 [decoder:3] Method "OGG" accepted 
> "/home/kevin/radio/content/test/d.ogg".
> 2013/03/23 14:39:01 [test(dot)pls:3] Prepared 
> "/home/kevin/radio/content/test/d.ogg" (RID 8).
> 2013/03/23 14:39:01 [test(dot)pls:3] Finished with 
> "/home/kevin/radio/content/test/d.ogg".
> 2013/03/23 14:39:01 [mksafe:3] Switch to safe_blank with forgetful transition.
> 2013/03/23 14:39:12 [main:3] Shutdown started!
> 2013/03/23 14:39:12 [main:3] Waiting for threads to terminate...
> 2013/03/23 14:39:12 [vorbis-dev:3] Closing connection...
> 2013/03/23 14:39:12 [mp3-dev:3] Closing connection...
> 2013/03/23 14:39:12 [clock.wallclock_main:3] Streaming loop stopped.
> 2013/03/23 14:39:12 [threads:3] Thread "wallclock_main" terminated (0 
> remaining).
> 2013/03/23 14:39:12 [main:3] Cleaning downloaded files...
> 2013/03/23 14:39:12 [main:3] Freeing memory...
> 2013/03/23 14:39:12 >>> LOG END
>
>
> Kevin
>
>
> On 2013-03-23, at 10:24 AM, Kevin McQuiggin <mcqui...@sfu.ca> wrote:
>
>> Hi Again All:
>>
>> I have done further research into the behaviour of merge_tracks() and 
>> switch().  Either I don't understand the correct behaviour of these 
>> constructs, or I have found a bug.  Demo code is attached and documented 
>> herein.  I have tried to document the issue clearly, and provided source 
>> code.  I hope this will help with resolution of my problem!
>>
>>
>> BACKGROUND:
>>
>> I want to use a switch() construct to play an -entire- playlist in normal 
>> (i.e. top to bottom) order at a specified time.  I am using merge_tracks() 
>> to join the target playlist into a single track.
>>
>>
>> PLATFORM:
>>
>> Liquidsoap 1.1.0 running on an Intel machine; Ubuntu 12.10 with all updates 
>> applied.
>>
>>
>> PLAYLIST:
>>
>> I have the following playlist, named "test.pls", which consists of 4 short 
>> .ogg files.  Each .ogg file is a 2-second long item that just contains the 
>> spoken audio "Item A", "Item B", "Item C", and "Item D".  The merged audio 
>> file will be only about 8 seconds in length.  Here is the playlist file:
>>
>> $ cat ../playlists/test.pls
>> /home/kevin/radio/content/test/a.ogg
>> /home/kevin/radio/content/test/b.ogg
>> /home/kevin/radio/content/test/c.ogg
>> /home/kevin/radio/content/test/d.ogg
>>
>>
>> PROGRAM CODE:
>>
>> I have written a short test program to play the merged "test.pls" source 
>> twice per minute.  Here is my short test program:
>>
>> $ cat demo.liq
>> #!/usr/local/bin/liquidsoap
>>
>> # Logging information:
>> set("log.file.path","/home/kevin/radio/log/test.log")
>>
>> # Test: merge tracks of test.pls:
>> zzz = merge_tracks(playlist.safe(reload_mode="watch", mode="normal", 
>> "~/radio/playlists/test.pls"))
>>
>> radio = mksafe(fallback(track_sensitive=false, [
>>                       switch([
>>                               ({0s}, zzz),
>>                               ({30s}, zzz)
>>                               ])
>>                       ]
>>               ))
>>
>> # Streaming:
>> output.icecast(%vorbis,
>>  host = "localhost", port = 8000,
>>  password = "donthackme", mount = "vorbis-dev",
>>  radio)
>>
>> output.icecast(
>>  %mp3(bitrate=128),
>>  host = "localhost", port = 8000,
>>  password = "donthackme", mount = "mp3-dev",
>>  radio)
>>
>>
>> EXPECTED BEHAVIOUR:
>>
>> I expected that the program would play the entire "test.pls" (items a, b, c, 
>> and d.ogg) twice every minute, at 0 seconds and 30 seconds of every minute. 
>> I should hear "Item A, Item B, Item C, Item D" for about 8 seconds, starting 
>> at 0 seconds; and then again at 30 seconds past each minute.
>>
>>
>> OBSERVED BEHAVIOUR:
>>
>> The program plays only 2 items,  "a.ogg" and "b.ogg" at 0 seconds of the 
>> minute; then it plays the other two items, "c.ogg" and "d.ogg" at 30 seconds 
>> past the minute.  This behaviour continues each minute.
>>
>>
>> SUMMARY:
>>
>> Either I don't understand the LS constructs, or there is a problem either 
>> with merge_tracks() or with switch().
>>
>> I am hoping for the former, as I would like to get my little project 
>> completed, but if this is a bug then I hope this information can help 
>> resolve it.
>>
>> I have attached my demo program code.
>>
>> Any assistance appreciated, I like LS so far and it will meet my project 
>> needs perfectly once I get the new program running!
>>
>> Kevin
>>
>> <demo.liq>------------------------------------------------------------------------------
>> Everyone hates slow websites. So do we.
>> Make your web apps faster with AppDynamics
>> Download AppDynamics Lite for free today:
>> http://p.sf.net/sfu/appdyn_d2d_mar_______________________________________________
>> Savonet-users mailing list
>> Savonet-users@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/savonet-users
>
>
> ------------------------------------------------------------------------------
> Everyone hates slow websites. So do we.
> Make your web apps faster with AppDynamics
> Download AppDynamics Lite for free today:
> http://p.sf.net/sfu/appdyn_d2d_mar
> _______________________________________________
> Savonet-users mailing list
> Savonet-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/savonet-users

------------------------------------------------------------------------------
Everyone hates slow websites. So do we.
Make your web apps faster with AppDynamics
Download AppDynamics Lite for free today:
http://p.sf.net/sfu/appdyn_d2d_mar
_______________________________________________
Savonet-users mailing list
Savonet-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/savonet-users

Reply via email to