summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorKimJeongYeon <jeongyeon.kim@samsung.com>2016-05-19 11:35:44 +0900
committerArun Raghavan <arun@arunraghavan.net>2016-06-22 12:55:55 +0530
commit81c8d380846ffb26d8529abb7a34db6428a2e8ef (patch)
tree738fda7f0e0644b71bcdf6bda164faa7e422e141 /src
parent111e332556ce98d52a73baad8f0b51e4885b8383 (diff)
ladspa-sink: avoid to configure invalid format
LADSPA allows float format only, but module-ladspa-sink possibly could be loaded with ***any*** 'format' parameter. Therefore noisy sound heard. This patch avoids to be configured as invalid format. Signed-off-by: KimJeongYeon <jeongyeon.kim@samsung.com> Signed-off-by: Arun Raghavan <arun@arunraghavan.net>
Diffstat (limited to 'src')
-rw-r--r--src/modules/module-ladspa-sink.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/modules/module-ladspa-sink.c b/src/modules/module-ladspa-sink.c
index 38b94e32e..a6290b9d6 100644
--- a/src/modules/module-ladspa-sink.c
+++ b/src/modules/module-ladspa-sink.c
@@ -981,6 +981,11 @@ int pa__init(pa_module*m) {
goto fail;
}
+ if (ss.format != PA_SAMPLE_FLOAT32) {
+ pa_log("LADSPA accepts float format only");
+ goto fail;
+ }
+
if (!(plugin = pa_modargs_get_value(ma, "plugin", NULL))) {
pa_log("Missing LADSPA plugin name");
goto fail;