[pulseaudio-discuss] [PATCH v2 2/2] Add argument deprecation error for module-waveout

Moritz Bruder muesli4 at googlemail.com
Wed Mar 1 18:29:53 UTC 2017


---
 src/modules/module-waveout.c | 12 +++++++++++-
 1 file changed, 11 insertions(+), 1 deletion(-)

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;
-- 
2.12.0



More information about the pulseaudio-discuss mailing list