summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMoritz Bruder <muesli4@googlemail.com>2017-03-01 19:29:53 +0100
committerTanu Kaskinen <tanuk@iki.fi>2017-03-07 18:15:17 +0200
commit48ba5e4957414a2cf9eae23f08988c8fc2f9169a (patch)
treee8ba8f24a3a5826b042cd07c7b68442612a9cc67
parent7259df959043b71bc835b42a67d0594fe9a3dd5c (diff)
waveout: add argument deprecation error
-rw-r--r--src/modules/module-waveout.c12
1 files changed, 11 insertions, 1 deletions
diff --git a/src/modules/module-waveout.c b/src/modules/module-waveout.c
index 96c92f43..610522b2 100644
--- a/src/modules/module-waveout.c
+++ b/src/modules/module-waveout.c
@@ -58,7 +58,9 @@ PA_MODULE_USAGE(
"channels=<number of channels> "
"channel_map=<channel map> "
"fragments=<number of fragments> "
- "fragment_size=<fragment size>");
+ "fragment_size=<fragment size>"
+ "device=<device number - deprecated>"
+ "device_name=<name of the device - deprecated>");
#define DEFAULT_SINK_NAME "wave_output"
#define DEFAULT_SOURCE_NAME "wave_input"
@@ -107,6 +109,8 @@ static const char* const valid_modargs[] = {
"rate",
"channels",
"channel_map",
+ "device",
+ "device_name",
NULL
};
@@ -521,6 +525,12 @@ int pa__init(pa_module *m) {
goto fail;
}
+ /* Check whether deprecated arguments have been used. */
+ if (pa_modargs_get_value(ma, "device", NULL) != NULL || pa_modargs_get_value(ma, "device_name", NULL) != NULL) {
+ pa_log("device and device_name are no longer supported. Please use input_device, input_device_name, output_device and output_device_name.");
+ goto fail;
+ }
+
if (pa_modargs_get_value_boolean(ma, "record", &record) < 0 || pa_modargs_get_value_boolean(ma, "playback", &playback) < 0) {
pa_log("record= and playback= expect boolean argument.");
goto fail;