CC-3641: Stream Transition: When a song is added to the for the first time
, the transition fade effects fade in - fixed
This commit is contained in:
parent
1bb04296a9
commit
7a983b52ed
|
@ -32,6 +32,24 @@ def transition(a,b) =
|
||||||
fade.final(duration=!default_dj_fade, a) ])
|
fade.final(duration=!default_dj_fade, a) ])
|
||||||
end
|
end
|
||||||
|
|
||||||
|
# we need this function for special transition case(from default to queue)
|
||||||
|
# we don't want the trasition fade to have effect on the first song that would
|
||||||
|
# be played siwtching out of the default(silent) source
|
||||||
|
def transition_default(a,b) =
|
||||||
|
log("transition called...")
|
||||||
|
if !just_switched then
|
||||||
|
just_switched := false
|
||||||
|
add(normalize=false,
|
||||||
|
[ sequence([ blank(duration=0.01),
|
||||||
|
fade.initial(duration=!default_dj_fade, b) ]),
|
||||||
|
fade.final(duration=!default_dj_fade, a) ])
|
||||||
|
else
|
||||||
|
just_switched := false
|
||||||
|
b
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
|
||||||
# Define a transition that fades out the
|
# Define a transition that fades out the
|
||||||
# old source, adds a single, and then
|
# old source, adds a single, and then
|
||||||
# plays the new source
|
# plays the new source
|
||||||
|
|
|
@ -24,6 +24,7 @@ s3_connected = ref ''
|
||||||
s1_namespace = ref ''
|
s1_namespace = ref ''
|
||||||
s2_namespace = ref ''
|
s2_namespace = ref ''
|
||||||
s3_namespace = ref ''
|
s3_namespace = ref ''
|
||||||
|
just_switched = ref false
|
||||||
|
|
||||||
%include "ls_lib.liq"
|
%include "ls_lib.liq"
|
||||||
|
|
||||||
|
@ -47,9 +48,9 @@ default = amplify(id="silence_src", 0.00001, noise())
|
||||||
default = rewrite_metadata([("artist","Airtime"), ("title", "offline")],default)
|
default = rewrite_metadata([("artist","Airtime"), ("title", "offline")],default)
|
||||||
ignore(output.dummy(default, fallible=true))
|
ignore(output.dummy(default, fallible=true))
|
||||||
|
|
||||||
master_dj_enabled = ref false;
|
master_dj_enabled = ref false
|
||||||
live_dj_enabled = ref false;
|
live_dj_enabled = ref false
|
||||||
scheduled_play_enabled = ref false;
|
scheduled_play_enabled = ref false
|
||||||
|
|
||||||
def make_master_dj_available()
|
def make_master_dj_available()
|
||||||
master_dj_enabled := true
|
master_dj_enabled := true
|
||||||
|
@ -69,6 +70,7 @@ end
|
||||||
|
|
||||||
def make_scheduled_play_available()
|
def make_scheduled_play_available()
|
||||||
scheduled_play_enabled := true
|
scheduled_play_enabled := true
|
||||||
|
just_switched := true
|
||||||
end
|
end
|
||||||
|
|
||||||
def make_scheduled_play_unavailable()
|
def make_scheduled_play_unavailable()
|
||||||
|
@ -150,7 +152,7 @@ def append_dj_inputs(master_harbor_input_port, master_harbor_input_mount_point,
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
s = switch(id="default_switch", track_sensitive=false, transitions=[transition, transition], [({!scheduled_play_enabled},queue),({true},default)])
|
s = switch(id="default_switch", track_sensitive=false, transitions=[transition_default, transition], [({!scheduled_play_enabled},queue),({true},default)])
|
||||||
s = append_dj_inputs(master_live_stream_port, master_live_stream_mp, dj_live_stream_port, dj_live_stream_mp, s)
|
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:
|
# Attach a skip command to the source s:
|
||||||
|
|
Loading…
Reference in New Issue