[pulseaudio-discuss] [PATCHv2 2/5] echo-cancel-test: Fix missing setup of sink_ss

Stefan Huber s.huber at bct-electronic.com
Tue Dec 18 04:52:31 PST 2012


In main() of echo-cancel-test it is wrongly assumed that the EC
implementation's init() function properly initializes sink_ss. In
contrast, pa__init() sets sink_ss by default to
sink_master->sample_spec. Fix this by setting sink_ss to default
parameters and let EC implementation's init() override these settings.

Signed-off-by: Stefan Huber <s.huber at bct-electronic.com>
Acked-by: Peter Meerwald <p.meerwald at bct-electronic.com>
---
 src/modules/echo-cancel/module-echo-cancel.c |    5 +++++
 1 file changed, 5 insertions(+)

diff --git a/src/modules/echo-cancel/module-echo-cancel.c b/src/modules/echo-cancel/module-echo-cancel.c
index f7c7276..5c639ae 100644
--- a/src/modules/echo-cancel/module-echo-cancel.c
+++ b/src/modules/echo-cancel/module-echo-cancel.c
@@ -2104,6 +2104,11 @@ int main(int argc, char* argv[]) {
     source_ss.channels = DEFAULT_CHANNELS;
     pa_channel_map_init_auto(&source_map, source_ss.channels, PA_CHANNEL_MAP_DEFAULT);
 
+    sink_ss.format = PA_SAMPLE_S16LE;
+    sink_ss.rate = DEFAULT_RATE;
+    sink_ss.channels = DEFAULT_CHANNELS;
+    pa_channel_map_init_auto(&sink_map, sink_ss.channels, PA_CHANNEL_MAP_DEFAULT);
+
     if (init_common(ma, &u, &source_ss, &source_map) < 0)
         goto fail;
 
-- 
1.7.9.5



More information about the pulseaudio-discuss mailing list