summaryrefslogtreecommitdiffstats
path: root/src/tests
diff options
context:
space:
mode:
Diffstat (limited to 'src/tests')
-rw-r--r--src/tests/asyncmsgq-test.c2
-rw-r--r--src/tests/asyncq-test.c2
-rw-r--r--src/tests/cpulimit-test.c2
-rw-r--r--src/tests/envelope-test.c2
-rw-r--r--src/tests/flist-test.c2
-rw-r--r--src/tests/get-binary-name-test.c2
-rw-r--r--src/tests/gtk-test.c2
-rw-r--r--src/tests/interpol-test.c19
-rw-r--r--src/tests/lock-autospawn-test.c2
-rw-r--r--src/tests/mainloop-test.c2
-rw-r--r--src/tests/memblock-test.c2
-rw-r--r--src/tests/memblockq-test.c2
-rw-r--r--src/tests/mix-test.c2
-rw-r--r--src/tests/pacat-simple.c2
-rw-r--r--src/tests/parec-simple.c2
-rw-r--r--src/tests/proplist-test.c2
-rw-r--r--src/tests/queue-test.c2
-rw-r--r--src/tests/remix-test.c2
-rw-r--r--src/tests/resampler-test.c2
-rw-r--r--src/tests/rtpoll-test.c2
-rw-r--r--src/tests/rtstutter.c2
-rw-r--r--src/tests/sig2str-test.c2
-rw-r--r--src/tests/smoother-test.c2
-rw-r--r--src/tests/stripnul.c2
-rw-r--r--src/tests/sync-playback.c2
-rw-r--r--src/tests/thread-mainloop-test.c2
-rw-r--r--src/tests/thread-test.c2
-rw-r--r--src/tests/vector-test.c2
28 files changed, 44 insertions, 29 deletions
diff --git a/src/tests/asyncmsgq-test.c b/src/tests/asyncmsgq-test.c
index 08ad3dd4..40c74f76 100644
--- a/src/tests/asyncmsgq-test.c
+++ b/src/tests/asyncmsgq-test.c
@@ -3,7 +3,7 @@
PulseAudio is free software; you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as published
- by the Free Software Foundation; either version 2 of the License,
+ by the Free Software Foundation; either version 2.1 of the License,
or (at your option) any later version.
PulseAudio is distributed in the hope that it will be useful, but
diff --git a/src/tests/asyncq-test.c b/src/tests/asyncq-test.c
index 4e8a1207..a617e1a0 100644
--- a/src/tests/asyncq-test.c
+++ b/src/tests/asyncq-test.c
@@ -3,7 +3,7 @@
PulseAudio is free software; you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as published
- by the Free Software Foundation; either version 2 of the License,
+ by the Free Software Foundation; either version 2.1 of the License,
or (at your option) any later version.
PulseAudio is distributed in the hope that it will be useful, but
diff --git a/src/tests/cpulimit-test.c b/src/tests/cpulimit-test.c
index fdc0162e..9d0f4eef 100644
--- a/src/tests/cpulimit-test.c
+++ b/src/tests/cpulimit-test.c
@@ -3,7 +3,7 @@
PulseAudio is free software; you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as
- published by the Free Software Foundation; either version 2 of the
+ published by the Free Software Foundation; either version 2.1 of the
License, or (at your option) any later version.
PulseAudio is distributed in the hope that it will be useful, but
diff --git a/src/tests/envelope-test.c b/src/tests/envelope-test.c
index 11a80a14..3af3044e 100644
--- a/src/tests/envelope-test.c
+++ b/src/tests/envelope-test.c
@@ -3,7 +3,7 @@
PulseAudio is free software; you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as published
- by the Free Software Foundation; either version 2 of the License,
+ by the Free Software Foundation; either version 2.1 of the License,
or (at your option) any later version.
PulseAudio is distributed in the hope that it will be useful, but
diff --git a/src/tests/flist-test.c b/src/tests/flist-test.c
index b2c648da..64c0add2 100644
--- a/src/tests/flist-test.c
+++ b/src/tests/flist-test.c
@@ -3,7 +3,7 @@
PulseAudio is free software; you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as published
- by the Free Software Foundation; either version 2 of the License,
+ by the Free Software Foundation; either version 2.1 of the License,
or (at your option) any later version.
PulseAudio is distributed in the hope that it will be useful, but
diff --git a/src/tests/get-binary-name-test.c b/src/tests/get-binary-name-test.c
index 7c7a8996..a34e38fd 100644
--- a/src/tests/get-binary-name-test.c
+++ b/src/tests/get-binary-name-test.c
@@ -3,7 +3,7 @@
PulseAudio is free software; you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as published
- by the Free Software Foundation; either version 2 of the License,
+ by the Free Software Foundation; either version 2.1 of the License,
or (at your option) any later version.
PulseAudio is distributed in the hope that it will be useful, but
diff --git a/src/tests/gtk-test.c b/src/tests/gtk-test.c
index 092ba25c..f82aca58 100644
--- a/src/tests/gtk-test.c
+++ b/src/tests/gtk-test.c
@@ -3,7 +3,7 @@
PulseAudio is free software; you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as published
- by the Free Software Foundation; either version 2 of the License,
+ by the Free Software Foundation; either version 2.1 of the License,
or (at your option) any later version.
PulseAudio is distributed in the hope that it will be useful, but
diff --git a/src/tests/interpol-test.c b/src/tests/interpol-test.c
index d7da660c..dd24e829 100644
--- a/src/tests/interpol-test.c
+++ b/src/tests/interpol-test.c
@@ -3,7 +3,7 @@
PulseAudio is free software; you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as published
- by the Free Software Foundation; either version 2 of the License,
+ by the Free Software Foundation; either version 2.1 of the License,
or (at your option) any later version.
PulseAudio is distributed in the hope that it will be useful, but
@@ -107,6 +107,7 @@ int main(int argc, char *argv[]) {
int k, r;
struct timeval start, last_info = { 0, 0 };
pa_usec_t old_t = 0, old_rtc = 0;
+ pa_bool_t corked = FALSE;
playback = argc <= 1 || !pa_streq(argv[1], "-r");
@@ -129,7 +130,7 @@ int main(int argc, char *argv[]) {
r = pa_threaded_mainloop_start(m);
assert(r >= 0);
- for (k = 0; k < 5000; k++) {
+ for (k = 0; k < 20000; k++) {
pa_bool_t success = FALSE, changed = FALSE;
pa_usec_t t, rtc;
struct timeval now, tv;
@@ -158,6 +159,8 @@ int main(int argc, char *argv[]) {
pa_gettimeofday(&now);
if (success) {
+ pa_bool_t cork_now;
+
rtc = pa_timeval_diff(&now, &start);
printf("%i\t%llu\t%llu\t%llu\t%llu\t%u\t%u\n", k,
(unsigned long long) rtc,
@@ -170,6 +173,18 @@ int main(int argc, char *argv[]) {
fflush(stdout);
old_t = t;
old_rtc = rtc;
+
+ cork_now = (rtc / (2*PA_USEC_PER_SEC)) % 2 == 1;
+
+ if (corked != cork_now) {
+ pa_threaded_mainloop_lock(m);
+ pa_operation_unref(pa_stream_cork(stream, cork_now, NULL, NULL));
+ pa_threaded_mainloop_unlock(m);
+
+ pa_log(cork_now ? "Corking" : "Uncorking");
+
+ corked = cork_now;
+ }
}
/* Spin loop, ugly but normal usleep() is just too badly grained */
diff --git a/src/tests/lock-autospawn-test.c b/src/tests/lock-autospawn-test.c
index 80cfda6a..c754e230 100644
--- a/src/tests/lock-autospawn-test.c
+++ b/src/tests/lock-autospawn-test.c
@@ -5,7 +5,7 @@
PulseAudio is free software; you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as published
- by the Free Software Foundation; either version 2 of the License,
+ by the Free Software Foundation; either version 2.1 of the License,
or (at your option) any later version.
PulseAudio is distributed in the hope that it will be useful, but
diff --git a/src/tests/mainloop-test.c b/src/tests/mainloop-test.c
index 2580fa72..d8926233 100644
--- a/src/tests/mainloop-test.c
+++ b/src/tests/mainloop-test.c
@@ -3,7 +3,7 @@
PulseAudio is free software; you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as published
- by the Free Software Foundation; either version 2 of the License,
+ by the Free Software Foundation; either version 2.1 of the License,
or (at your option) any later version.
PulseAudio is distributed in the hope that it will be useful, but
diff --git a/src/tests/memblock-test.c b/src/tests/memblock-test.c
index 37b5b403..9cf6c78b 100644
--- a/src/tests/memblock-test.c
+++ b/src/tests/memblock-test.c
@@ -3,7 +3,7 @@
PulseAudio is free software; you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as published
- by the Free Software Foundation; either version 2 of the License,
+ by the Free Software Foundation; either version 2.1 of the License,
or (at your option) any later version.
PulseAudio is distributed in the hope that it will be useful, but
diff --git a/src/tests/memblockq-test.c b/src/tests/memblockq-test.c
index b01a4fd5..127fb197 100644
--- a/src/tests/memblockq-test.c
+++ b/src/tests/memblockq-test.c
@@ -3,7 +3,7 @@
PulseAudio is free software; you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as published
- by the Free Software Foundation; either version 2 of the License,
+ by the Free Software Foundation; either version 2.1 of the License,
or (at your option) any later version.
PulseAudio is distributed in the hope that it will be useful, but
diff --git a/src/tests/mix-test.c b/src/tests/mix-test.c
index db8ac6e3..ac4b57b5 100644
--- a/src/tests/mix-test.c
+++ b/src/tests/mix-test.c
@@ -3,7 +3,7 @@
PulseAudio is free software; you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as published
- by the Free Software Foundation; either version 2 of the License,
+ by the Free Software Foundation; either version 2.1 of the License,
or (at your option) any later version.
PulseAudio is distributed in the hope that it will be useful, but
diff --git a/src/tests/pacat-simple.c b/src/tests/pacat-simple.c
index ffe3176a..d4224e11 100644
--- a/src/tests/pacat-simple.c
+++ b/src/tests/pacat-simple.c
@@ -3,7 +3,7 @@
PulseAudio is free software; you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as published
- by the Free Software Foundation; either version 2 of the License,
+ by the Free Software Foundation; either version 2.1 of the License,
or (at your option) any later version.
PulseAudio is distributed in the hope that it will be useful, but
diff --git a/src/tests/parec-simple.c b/src/tests/parec-simple.c
index c9d3bef5..9f19ff47 100644
--- a/src/tests/parec-simple.c
+++ b/src/tests/parec-simple.c
@@ -3,7 +3,7 @@
PulseAudio is free software; you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as published
- by the Free Software Foundation; either version 2 of the License,
+ by the Free Software Foundation; either version 2.1 of the License,
or (at your option) any later version.
PulseAudio is distributed in the hope that it will be useful, but
diff --git a/src/tests/proplist-test.c b/src/tests/proplist-test.c
index 5526bb7e..3e723561 100644
--- a/src/tests/proplist-test.c
+++ b/src/tests/proplist-test.c
@@ -3,7 +3,7 @@
PulseAudio is free software; you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as published
- by the Free Software Foundation; either version 2 of the License,
+ by the Free Software Foundation; either version 2.1 of the License,
or (at your option) any later version.
PulseAudio is distributed in the hope that it will be useful, but
diff --git a/src/tests/queue-test.c b/src/tests/queue-test.c
index ceae4e47..7ee2693d 100644
--- a/src/tests/queue-test.c
+++ b/src/tests/queue-test.c
@@ -3,7 +3,7 @@
PulseAudio is free software; you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as published
- by the Free Software Foundation; either version 2 of the License,
+ by the Free Software Foundation; either version 2.1 of the License,
or (at your option) any later version.
PulseAudio is distributed in the hope that it will be useful, but
diff --git a/src/tests/remix-test.c b/src/tests/remix-test.c
index 3da4ee33..9d110d6b 100644
--- a/src/tests/remix-test.c
+++ b/src/tests/remix-test.c
@@ -3,7 +3,7 @@
PulseAudio is free software; you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as published
- by the Free Software Foundation; either version 2 of the License,
+ by the Free Software Foundation; either version 2.1 of the License,
or (at your option) any later version.
PulseAudio is distributed in the hope that it will be useful, but
diff --git a/src/tests/resampler-test.c b/src/tests/resampler-test.c
index da8d3756..6b4a64ca 100644
--- a/src/tests/resampler-test.c
+++ b/src/tests/resampler-test.c
@@ -3,7 +3,7 @@
PulseAudio is free software; you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as published
- by the Free Software Foundation; either version 2 of the License,
+ by the Free Software Foundation; either version 2.1 of the License,
or (at your option) any later version.
PulseAudio is distributed in the hope that it will be useful, but
diff --git a/src/tests/rtpoll-test.c b/src/tests/rtpoll-test.c
index 953fd61d..4ac96446 100644
--- a/src/tests/rtpoll-test.c
+++ b/src/tests/rtpoll-test.c
@@ -3,7 +3,7 @@
PulseAudio is free software; you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as published
- by the Free Software Foundation; either version 2 of the License,
+ by the Free Software Foundation; either version 2.1 of the License,
or (at your option) any later version.
PulseAudio is distributed in the hope that it will be useful, but
diff --git a/src/tests/rtstutter.c b/src/tests/rtstutter.c
index d8aff342..f04d43af 100644
--- a/src/tests/rtstutter.c
+++ b/src/tests/rtstutter.c
@@ -5,7 +5,7 @@
PulseAudio is free software; you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as
- published by the Free Software Foundation; either version 2 of the
+ published by the Free Software Foundation; either version 2.1 of the
License, or (at your option) any later version.
PulseAudio is distributed in the hope that it will be useful, but
diff --git a/src/tests/sig2str-test.c b/src/tests/sig2str-test.c
index d64a8902..0cd929ca 100644
--- a/src/tests/sig2str-test.c
+++ b/src/tests/sig2str-test.c
@@ -3,7 +3,7 @@
PulseAudio is free software; you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as published
- by the Free Software Foundation; either version 2 of the License,
+ by the Free Software Foundation; either version 2.1 of the License,
or (at your option) any later version.
PulseAudio is distributed in the hope that it will be useful, but
diff --git a/src/tests/smoother-test.c b/src/tests/smoother-test.c
index 15700ec2..798dfed5 100644
--- a/src/tests/smoother-test.c
+++ b/src/tests/smoother-test.c
@@ -3,7 +3,7 @@
PulseAudio is free software; you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as published
- by the Free Software Foundation; either version 2 of the License,
+ by the Free Software Foundation; either version 2.1 of the License,
or (at your option) any later version.
PulseAudio is distributed in the hope that it will be useful, but
diff --git a/src/tests/stripnul.c b/src/tests/stripnul.c
index 2b8aa083..1d8c4938 100644
--- a/src/tests/stripnul.c
+++ b/src/tests/stripnul.c
@@ -3,7 +3,7 @@
PulseAudio is free software; you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as published
- by the Free Software Foundation; either version 2 of the License,
+ by the Free Software Foundation; either version 2.1 of the License,
or (at your option) any later version.
PulseAudio is distributed in the hope that it will be useful, but
diff --git a/src/tests/sync-playback.c b/src/tests/sync-playback.c
index f2a15601..bb64a91f 100644
--- a/src/tests/sync-playback.c
+++ b/src/tests/sync-playback.c
@@ -3,7 +3,7 @@
PulseAudio is free software; you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as published
- by the Free Software Foundation; either version 2 of the License,
+ by the Free Software Foundation; either version 2.1 of the License,
or (at your option) any later version.
PulseAudio is distributed in the hope that it will be useful, but
diff --git a/src/tests/thread-mainloop-test.c b/src/tests/thread-mainloop-test.c
index 3bcf4f16..ad89414f 100644
--- a/src/tests/thread-mainloop-test.c
+++ b/src/tests/thread-mainloop-test.c
@@ -3,7 +3,7 @@
PulseAudio is free software; you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as published
- by the Free Software Foundation; either version 2 of the License,
+ by the Free Software Foundation; either version 2.1 of the License,
or (at your option) any later version.
PulseAudio is distributed in the hope that it will be useful, but
diff --git a/src/tests/thread-test.c b/src/tests/thread-test.c
index f29b5e71..2c07b1cc 100644
--- a/src/tests/thread-test.c
+++ b/src/tests/thread-test.c
@@ -3,7 +3,7 @@
PulseAudio is free software; you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as published
- by the Free Software Foundation; either version 2 of the License,
+ by the Free Software Foundation; either version 2.1 of the License,
or (at your option) any later version.
PulseAudio is distributed in the hope that it will be useful, but
diff --git a/src/tests/vector-test.c b/src/tests/vector-test.c
index f7344172..7494348c 100644
--- a/src/tests/vector-test.c
+++ b/src/tests/vector-test.c
@@ -5,7 +5,7 @@
PulseAudio is free software; you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as
- published by the Free Software Foundation; either version 2 of the
+ published by the Free Software Foundation; either version 2.1 of the
License, or (at your option) any later version.
PulseAudio is distributed in the hope that it will be useful, but