[pulseaudio-commits] 3 commits - src/modules

Tanu Kaskinen tanuk at kemper.freedesktop.org
Sat Feb 16 11:46:42 PST 2013


 src/modules/echo-cancel/module-echo-cancel.c |   19 +++++++++++--------
 1 file changed, 11 insertions(+), 8 deletions(-)

New commits:
commit 9b6dced2cb2df31cde66bad57cc5a0b45842ca66
Author: Stefan Huber <s.huber at bct-electronic.com>
Date:   Mon Feb 11 10:56:46 2013 +0100

    echo-cancel-test: When fopen() fails tell which file failed

diff --git a/src/modules/echo-cancel/module-echo-cancel.c b/src/modules/echo-cancel/module-echo-cancel.c
index db6b46c..9d94a83 100644
--- a/src/modules/echo-cancel/module-echo-cancel.c
+++ b/src/modules/echo-cancel/module-echo-cancel.c
@@ -2103,17 +2103,17 @@ int main(int argc, char* argv[]) {
 
     u.captured_file = fopen(argv[2], "rb");
     if (u.captured_file == NULL) {
-        perror ("fopen failed");
+        perror ("Could not open capture file");
         goto fail;
     }
     u.played_file = fopen(argv[1], "rb");
     if (u.played_file == NULL) {
-        perror ("fopen failed");
+        perror ("Could not open play file");
         goto fail;
     }
     u.canceled_file = fopen(argv[3], "wb");
     if (u.canceled_file == NULL) {
-        perror ("fopen failed");
+        perror ("Could not open canceled file");
         goto fail;
     }
 
@@ -2156,7 +2156,7 @@ int main(int argc, char* argv[]) {
         u.drift_file = fopen(argv[5], "rt");
 
         if (u.drift_file == NULL) {
-            perror ("fopen failed");
+            perror ("Could not open drift file");
             goto fail;
         }
     }

commit 7eff884848a3c1d15bc37e1602a78e63fa9cc511
Author: Stefan Huber <s.huber at bct-electronic.com>
Date:   Mon Feb 11 10:56:45 2013 +0100

    echo-cancel-test: Pass aec_args with module args
    
    The echo canceller module can pass arguments to the EC implementation
    via the module parameter aec_args. However, the echo-cancel-test passes
    EC arguments via a separate argv[] option, which is inconsistent. Fix
    this.

diff --git a/src/modules/echo-cancel/module-echo-cancel.c b/src/modules/echo-cancel/module-echo-cancel.c
index 718e104..db6b46c 100644
--- a/src/modules/echo-cancel/module-echo-cancel.c
+++ b/src/modules/echo-cancel/module-echo-cancel.c
@@ -2140,7 +2140,7 @@ int main(int argc, char* argv[]) {
         goto fail;
 
     if (!u.ec->init(u.core, u.ec, &source_ss, &source_map, &sink_ss, &sink_map, &nframes,
-                     (argc > 5) ? argv[5] : NULL )) {
+                     pa_modargs_get_value(ma, "aec_args", NULL))) {
         pa_log("Failed to init AEC engine");
         goto fail;
     }
@@ -2148,12 +2148,12 @@ int main(int argc, char* argv[]) {
     u.sink_blocksize = nframes * pa_frame_size(&sink_ss);
 
     if (u.ec->params.drift_compensation) {
-        if (argc < 7) {
+        if (argc < 6) {
             pa_log("Drift compensation enabled but drift file not specified");
             goto fail;
         }
 
-        u.drift_file = fopen(argv[6], "rt");
+        u.drift_file = fopen(argv[5], "rt");
 
         if (u.drift_file == NULL) {
             perror ("fopen failed");
@@ -2254,7 +2254,7 @@ out:
     return ret;
 
 usage:
-    pa_log("Usage: %s play_file rec_file out_file [module args] [aec_args] [drift_file]", argv[0]);
+    pa_log("Usage: %s play_file rec_file out_file [module args] [drift_file]", argv[0]);
 
 fail:
     ret = -1;

commit 8aa30049ec69f736983398dd038d918df9dc0d78
Author: Stefan Huber <s.huber at bct-electronic.com>
Date:   Mon Feb 11 10:56:44 2013 +0100

    echo-cancel-test: Enable debug log level

diff --git a/src/modules/echo-cancel/module-echo-cancel.c b/src/modules/echo-cancel/module-echo-cancel.c
index 8ce6330..718e104 100644
--- a/src/modules/echo-cancel/module-echo-cancel.c
+++ b/src/modules/echo-cancel/module-echo-cancel.c
@@ -2092,6 +2092,9 @@ int main(int argc, char* argv[]) {
     float drift;
     uint32_t nframes;
 
+    if (!getenv("MAKE_CHECK"))
+        pa_log_set_level(PA_LOG_DEBUG);
+
     pa_memzero(&u, sizeof(u));
 
     if (argc < 4 || argc > 7) {



More information about the pulseaudio-commits mailing list