[pulseaudio-commits] 2 commits - src/pulsecore src/tests

Arun Raghavan arun at kemper.freedesktop.org
Fri Nov 6 04:40:59 PST 2015


 src/pulsecore/resampler.c |    5 +++++
 src/tests/extended-test.c |    2 ++
 src/tests/sync-playback.c |    3 ++-
 3 files changed, 9 insertions(+), 1 deletion(-)

New commits:
commit 3e0c30622bdbc9dd204222ea2eafaa85da22d153
Author: Arun Raghavan <git at arunraghavan.net>
Date:   Mon Nov 2 11:46:46 2015 +0530

    tests: Set appropriate timeouts for a couple of tests
    
    sync-playback just had a much longer timeout than it should have, and
    extended-test was using the default. We set the expected amount of time,
    so the test is more correct (if it takes longer than this, something
    probably actually broke).

diff --git a/src/tests/extended-test.c b/src/tests/extended-test.c
index 6c7f991..ee766b8 100644
--- a/src/tests/extended-test.c
+++ b/src/tests/extended-test.c
@@ -209,6 +209,8 @@ int main(int argc, char *argv[]) {
     s = suite_create("Extended");
     tc = tcase_create("extended");
     tcase_add_test(tc, extended_test);
+    /* 4s of audio, 0.5s grace time */
+    tcase_set_timeout(tc, 4.5);
     suite_add_tcase(s, tc);
 
     sr = srunner_create(s);
diff --git a/src/tests/sync-playback.c b/src/tests/sync-playback.c
index 205383d..f06b459 100644
--- a/src/tests/sync-playback.c
+++ b/src/tests/sync-playback.c
@@ -206,7 +206,8 @@ int main(int argc, char *argv[]) {
     s = suite_create("Sync Playback");
     tc = tcase_create("syncplayback");
     tcase_add_test(tc, sync_playback_test);
-    tcase_set_timeout(tc, 5 * 60);
+    /* 4s of audio, 0.5s grace time */
+    tcase_set_timeout(tc, 4.5);
     suite_add_tcase(s, tc);
 
     sr = srunner_create(s);

commit daf326a9e4dcd5c9d716e6c2fc0a07b99f6ee1c0
Author: Arun Raghavan <git at arunraghavan.net>
Date:   Fri Nov 6 15:54:55 2015 +0530

    resampler: Don't expose soxr methods if they are not supported
    
    Fixes: https://bugs.freedesktop.org/show_bug.cgi?id=92780

diff --git a/src/pulsecore/resampler.c b/src/pulsecore/resampler.c
index bf3fdb8..b683b05 100644
--- a/src/pulsecore/resampler.c
+++ b/src/pulsecore/resampler.c
@@ -685,6 +685,11 @@ int pa_resample_method_supported(pa_resample_method_t m) {
         return 0;
 #endif
 
+#ifndef HAVE_SOXR
+    if (m >= PA_RESAMPLER_SOXR_MQ && m <= PA_RESAMPLER_SOXR_VHQ)
+        return 0;
+#endif
+
     return 1;
 }
 



More information about the pulseaudio-commits mailing list