[pulseaudio-commits] 6 commits - src/modules src/pulsecore src/tests src/utils

Arun Raghavan arun at kemper.freedesktop.org
Wed Dec 14 08:28:26 PST 2011


 src/modules/echo-cancel/module-echo-cancel.c |   30 +++++++++++++++------------
 src/pulsecore/protocol-native.c              |    4 +--
 src/tests/resampler-test.c                   |    2 +
 src/utils/pax11publish.c                     |    2 +
 4 files changed, 23 insertions(+), 15 deletions(-)

New commits:
commit 37bd1587014778400f90b8a7a64266fc405f9c0f
Author: Arun Raghavan <arun.raghavan at collabora.co.uk>
Date:   Wed Dec 14 21:57:01 2011 +0530

    x11: Fix build without NLS support

diff --git a/src/utils/pax11publish.c b/src/utils/pax11publish.c
index ddfb724..d3ffc78 100644
--- a/src/utils/pax11publish.c
+++ b/src/utils/pax11publish.c
@@ -48,7 +48,9 @@ int main(int argc, char *argv[]) {
     enum { DUMP, EXPORT, IMPORT, REMOVE } mode = DUMP;
 
     setlocale(LC_ALL, "");
+#ifdef ENABLE_NLS
     bindtextdomain(GETTEXT_PACKAGE, PULSE_LOCALEDIR);
+#endif
 
     while ((c = getopt(argc, argv, "deiD:S:O:I:c:hr")) != -1) {
         switch (c) {

commit 5a908ae513c48c1e37686c0fdc4c066811af8df1
Author: Peter Meerwald <p.meerwald at bct-electronic.com>
Date:   Wed Dec 14 16:07:57 2011 +0100

    tests: Fix resampler-test compilation without NLS support

diff --git a/src/tests/resampler-test.c b/src/tests/resampler-test.c
index ebd6fdd..87681c6 100644
--- a/src/tests/resampler-test.c
+++ b/src/tests/resampler-test.c
@@ -323,7 +323,9 @@ int main(int argc, char *argv[]) {
     };
 
     setlocale(LC_ALL, "");
+#ifdef ENABLE_NLS
     bindtextdomain(GETTEXT_PACKAGE, PULSE_LOCALEDIR);
+#endif
 
     pa_log_set_level(PA_LOG_WARN);
     if (!getenv("MAKE_CHECK"))

commit be9ef2e96c2c86d7ba8ad0e230a32457bf69ac0b
Author: Peter Meerwald <p.meerwald at bct-electronic.com>
Date:   Tue Dec 13 15:51:54 2011 +0100

    echo-cancel: Better handling of error conditions in test

diff --git a/src/modules/echo-cancel/module-echo-cancel.c b/src/modules/echo-cancel/module-echo-cancel.c
index 33458c4..d977ef9 100644
--- a/src/modules/echo-cancel/module-echo-cancel.c
+++ b/src/modules/echo-cancel/module-echo-cancel.c
@@ -1694,7 +1694,7 @@ int pa__init(pa_module*m) {
         goto fail;
     }
 
-    if (init_common(ma, u, &source_ss, &source_map))
+    if (init_common(ma, u, &source_ss, &source_map) < 0)
         goto fail;
 
     u->asyncmsgq = pa_asyncmsgq_new(0);
@@ -2077,7 +2077,8 @@ 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);
 
-    init_common(ma, &u, &source_ss, &source_map);
+    if (init_common(ma, &u, &source_ss, &source_map) < 0)
+        goto fail;
 
     if (!u.ec->init(u.core, u.ec, &source_ss, &source_map, &sink_ss, &sink_map, &u.blocksize,
                      (argc > 4) ? argv[5] : NULL )) {
@@ -2169,13 +2170,16 @@ int main(int argc, char* argv[]) {
 
     u.ec->done(u.ec);
 
-    fclose(u.captured_file);
-    fclose(u.played_file);
-    fclose(u.canceled_file);
+out:
+    if (u.captured_file)
+        fclose(u.captured_file);
+    if (u.played_file)
+        fclose(u.played_file);
+    if (u.canceled_file)
+        fclose(u.canceled_file);
     if (u.drift_file)
         fclose(u.drift_file);
 
-out:
     pa_xfree(rdata);
     pa_xfree(pdata);
     pa_xfree(cdata);

commit 6eb0f133c4ead79bf237e7726edb12465bbafb37
Author: Peter Meerwald <p.meerwald at bct-electronic.com>
Date:   Tue Dec 13 15:51:53 2011 +0100

    echo-cancel: Begin log message with uppercase letter

diff --git a/src/modules/echo-cancel/module-echo-cancel.c b/src/modules/echo-cancel/module-echo-cancel.c
index 7d55594..33458c4 100644
--- a/src/modules/echo-cancel/module-echo-cancel.c
+++ b/src/modules/echo-cancel/module-echo-cancel.c
@@ -310,7 +310,7 @@ static int64_t calc_diff(struct userdata *u, struct snapshot *snapshot) {
     diff_time = (snapshot->sink_now + snapshot->sink_latency - buffer_latency) -
           (snapshot->source_now - snapshot->source_latency);
 
-    pa_log_debug("diff %lld (%lld - %lld + %lld) %lld %lld %lld %lld", (long long) diff_time,
+    pa_log_debug("Diff %lld (%lld - %lld + %lld) %lld %lld %lld %lld", (long long) diff_time,
         (long long) snapshot->sink_latency,
         (long long) buffer_latency, (long long) snapshot->source_latency,
         (long long) snapshot->source_delay, (long long) snapshot->sink_delay,
@@ -668,7 +668,7 @@ static void apply_diff_time(struct userdata *u, int64_t diff_time) {
         diff = pa_usec_to_bytes(diff_time, &u->source_output->sample_spec);
 
         if (diff > 0) {
-            pa_log("playback too far ahead (%lld), drop source %lld", (long long) diff_time, (long long) diff);
+            pa_log("Playback too far ahead (%lld), drop source %lld", (long long) diff_time, (long long) diff);
 
             u->source_skip = diff;
             u->sink_skip = 0;
@@ -873,7 +873,7 @@ static void source_output_push_cb(pa_source_output *o, const pa_memchunk *chunk)
     pa_assert_se(u = o->userdata);
 
     if (!PA_SOURCE_OUTPUT_IS_LINKED(pa_source_output_get_state(u->source_output))) {
-        pa_log("push when no link?");
+        pa_log("Push when no link?");
         return;
     }
 
@@ -1168,7 +1168,7 @@ static void source_output_update_source_requested_latency_cb(pa_source_output *o
 
     latency = pa_source_get_requested_latency_within_thread(o->source);
 
-    pa_log_debug("source output update requested latency %lld", (long long) latency);
+    pa_log_debug("Source output update requested latency %lld", (long long) latency);
 }
 
 /* Called from I/O thread context */

commit f40df053c865b0caf27ca60217fc9f5a04e41a99
Author: Peter Meerwald <p.meerwald at bct-electronic.com>
Date:   Tue Dec 13 15:51:52 2011 +0100

    echo-cancel: Set file mode to binary in test code

diff --git a/src/modules/echo-cancel/module-echo-cancel.c b/src/modules/echo-cancel/module-echo-cancel.c
index 5c7bb78..7d55594 100644
--- a/src/modules/echo-cancel/module-echo-cancel.c
+++ b/src/modules/echo-cancel/module-echo-cancel.c
@@ -2047,12 +2047,12 @@ int main(int argc, char* argv[]) {
         goto usage;
     }
 
-    u.captured_file = fopen(argv[2], "r");
+    u.captured_file = fopen(argv[2], "rb");
     if (u.captured_file == NULL) {
         perror ("fopen failed");
         goto fail;
     }
-    u.played_file = fopen(argv[1], "r");
+    u.played_file = fopen(argv[1], "rb");
     if (u.played_file == NULL) {
         perror ("fopen failed");
         goto fail;
@@ -2091,7 +2091,7 @@ int main(int argc, char* argv[]) {
             goto fail;
         }
 
-        u.drift_file = fopen(argv[6], "r");
+        u.drift_file = fopen(argv[6], "rt");
 
         if (u.drift_file == NULL) {
             perror ("fopen failed");

commit 0bbe94f5db9324702afe97eab6e3b1bcedb724a3
Author: Arun Raghavan <arun.raghavan at collabora.co.uk>
Date:   Wed Dec 14 20:48:12 2011 +0530

    protocol-native: Fix 'auth-group-enabled' modarg
    
    This is actually implemented in module-protocol-stub as
    'auth-group-enable'. An unfortunate typo because the other argument is
    spelt as 'enabled', but it's better to be slightly inconsistent than to
    change the public interface.

diff --git a/src/pulsecore/protocol-native.c b/src/pulsecore/protocol-native.c
index 841734f..cbd5fef 100644
--- a/src/pulsecore/protocol-native.c
+++ b/src/pulsecore/protocol-native.c
@@ -5145,8 +5145,8 @@ int pa_native_options_parse(pa_native_options *o, pa_core *c, pa_modargs *ma) {
     }
 
     enabled = TRUE;
-    if (pa_modargs_get_value_boolean(ma, "auth-group-enabled", &enabled) < 0) {
-        pa_log("auth-group-enabled= expects a boolean argument.");
+    if (pa_modargs_get_value_boolean(ma, "auth-group-enable", &enabled) < 0) {
+        pa_log("auth-group-enable= expects a boolean argument.");
         return -1;
     }
 



More information about the pulseaudio-commits mailing list