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>
This commit is contained in:
KimJeongYeon 2016-05-19 11:35:44 +09:00 committed by Arun Raghavan
parent 111e332556
commit 81c8d38084

View file

@ -981,6 +981,11 @@ int pa__init(pa_module*m) {
goto fail; 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))) { if (!(plugin = pa_modargs_get_value(ma, "plugin", NULL))) {
pa_log("Missing LADSPA plugin name"); pa_log("Missing LADSPA plugin name");
goto fail; goto fail;