From 704a8d08051d5b1d4d867855b20c05fe41f5934e Mon Sep 17 00:00:00 2001 From: Martin Konecny Date: Thu, 16 Aug 2012 23:50:32 -0400 Subject: [PATCH] CC-1665: Scheduled stream rebroadcasting and recording -make sure any buffers are cleared out from stream when queue is playing and vice-versa --- python_apps/pypo/liquidsoap_scripts/ls_script.liq | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/python_apps/pypo/liquidsoap_scripts/ls_script.liq b/python_apps/pypo/liquidsoap_scripts/ls_script.liq index 9a141c738..e06f901c7 100644 --- a/python_apps/pypo/liquidsoap_scripts/ls_script.liq +++ b/python_apps/pypo/liquidsoap_scripts/ls_script.liq @@ -47,9 +47,13 @@ queue = map_metadata(update=false, append_title, queue) # the crossfade function controls fade in/out queue = crossfade(queue) -queue = switch(id="stream_queue_switch", track_sensitive=false, [({!webstream_enabled},web_stream), ({true}, queue)]) +#make sure we are clearing all buffered data even when the source isn't being actively used +output.dummy(queue, fallible=true) +output.dummy(web_stream, fallible=true) -ignore(output.dummy(queue, fallible=true)) +stream_queue = switch(id="stream_queue_switch", track_sensitive=false, transitions=[transition, transition], [({!webstream_enabled},web_stream), ({true}, queue)]) + +ignore(output.dummy(stream_queue, fallible=true)) server.register(namespace="vars", "pypo_data", @@ -208,7 +212,7 @@ def append_dj_inputs(master_harbor_input_port, master_harbor_input_mount_point, end end -s = switch(id="default_switch", track_sensitive=false, transitions=[transition_default, transition], [({!scheduled_play_enabled},queue),({true},default)]) +s = switch(id="default_switch", track_sensitive=false, transitions=[transition_default, transition], [({!scheduled_play_enabled},stream_queue),({true},default)]) s = append_dj_inputs(master_live_stream_port, master_live_stream_mp, dj_live_stream_port, dj_live_stream_mp, s) # Attach a skip command to the source s: