Skip to content
Snippets Groups Projects
Commit b540ac73 authored by David Trattnig's avatar David Trattnig
Browse files

Fallback mixer and clear functions. #44

parent ed77a17c
No related branches found
No related tags found
No related merge requests found
......@@ -98,7 +98,7 @@ fallback_one = fallback(
id="fallback-scheduled",
track_sensitive=false,
replay_metadata=true,
[ stripped_stream, input_fallback_scheduled_0, input_fallback_scheduled_1])
[ stripped_stream, stripped_fallback_mixer])
fallback_two = fallback(
id="fallback-station-playlist",
......
......@@ -17,7 +17,7 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>.
fallback_inputs = ref []
#####################################
# FALLBACK SOURCES #
......@@ -54,6 +54,25 @@ input_fallback_scheduled_1 = on_metadata(id="in_fallback_scheduled_1", on_metada
station_playlist = on_metadata(id="station_playlist", on_metadata_notification, station_playlist)
station_folder = on_metadata(id="station_folder", on_metadata_notification, station_folder)
# Mixer for more control of scheduled fallbacks
fallback_mixer = mix(id="mixer_fallback",
list.append(
[
input_fallback_scheduled_0,
input_fallback_scheduled_1
],
!fallback_inputs
)
)
stripped_fallback_mixer = strip_blank(
id="fallback_strip_blank",
track_sensitive=false,
max_blank=fallback_max_blank,
min_noise=fallback_min_noise,
threshold=fallback_threshold,
fallback_mixer
)
#####################################
# SERVER FUNCTIONS #
......@@ -68,7 +87,8 @@ server.register(namespace=source.id(input_fallback_scheduled_0),
"clear",
fun (s) ->
begin
begin
source.skip(input_fallback_scheduled_0)
clear_queue(input_fallback_scheduled_0)
"Clearing done."
end
......@@ -81,7 +101,8 @@ server.register(namespace=source.id(input_fallback_scheduled_1),
"clear",
fun (s) ->
begin
begin
source.skip(input_fallback_scheduled_1)
clear_queue(input_fallback_scheduled_1)
"Clearing done."
end
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment