Implement module-always-source

This is basically a copy of module-always-sink but doing the same for
sources. Whenever no source is available, a module-null-source is loaded
and whenever a new source is available again, module-null-source is
unloaded.

By this, anything using a source will automatically be switched to the
null source when the actual source disappears, and back to the actual
source if it appears again.
This commit is contained in:
Sebastian Dröge 2017-06-30 00:57:36 +03:00 committed by Tanu Kaskinen
parent c7fe78c9f7
commit b4d2443249
3 changed files with 198 additions and 0 deletions

View file

@ -1193,6 +1193,7 @@ modlibexec_LTLIBRARIES += \
module-card-restore.la \
module-default-device-restore.la \
module-always-sink.la \
module-always-source.la \
module-rescue-streams.la \
module-intended-roles.la \
module-suspend-on-idle.la \
@ -1534,6 +1535,7 @@ SYMDEF_FILES = \
module-card-restore-symdef.h \
module-default-device-restore-symdef.h \
module-always-sink-symdef.h \
module-always-source-symdef.h \
module-rescue-streams-symdef.h \
module-intended-roles-symdef.h \
module-suspend-on-idle-symdef.h \
@ -2021,6 +2023,12 @@ module_always_sink_la_LDFLAGS = $(MODULE_LDFLAGS)
module_always_sink_la_LIBADD = $(MODULE_LIBADD)
module_always_sink_la_CFLAGS = $(AM_CFLAGS)
# Always Source module
module_always_source_la_SOURCES = modules/module-always-source.c
module_always_source_la_LDFLAGS = $(MODULE_LDFLAGS)
module_always_source_la_LIBADD = $(MODULE_LIBADD)
module_always_source_la_CFLAGS = $(AM_CFLAGS)
# Rescue streams module
module_rescue_streams_la_SOURCES = modules/module-rescue-streams.c
module_rescue_streams_la_LDFLAGS = $(MODULE_LDFLAGS)