Hi, 2013/3/23 Kevin McQuiggin <mcqui...@sfu.ca>: > 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!
Thank you very much for your work on narrowing this down! I will try to reproduce very soon. In the mean time, I have the same question: could you show some logs? Thanks! Romain ------------------------------------------------------------------------------ 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