1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
|
From c91ca053ba2f821355e029e3f7c7255a1548578c Mon Sep 17 00:00:00 2001
From: =?utf-8?q?Marc-Andr=C3=A9=20Lureau?= <marc-andre.lureau@nokia.com>
Date: Fri, 29 May 2009 15:56:24 +0300
Subject: [PATCH] resample: fix rtclock and style
---
src/tests/resampler-test.c | 15 ++++++++-------
1 files changed, 8 insertions(+), 7 deletions(-)
diff --git a/src/tests/resampler-test.c b/src/tests/resampler-test.c
index 2e18e96..caa178e 100644
--- a/src/tests/resampler-test.c
+++ b/src/tests/resampler-test.c
@@ -28,6 +28,7 @@
#include <pulse/i18n.h>
#include <pulse/pulseaudio.h>
+#include <pulse/rtclock.h>
#include <pulse/sample.h>
#include <pulse/volume.h>
@@ -36,8 +37,8 @@
#include <pulsecore/endianmacros.h>
#include <pulsecore/memblock.h>
#include <pulsecore/sample-util.h>
+#include <pulsecore/core-rtclock.h>
#include <pulsecore/core-util.h>
-#include <pulsecore/rtclock.h>
#include <liboil/liboil.h>
@@ -236,7 +237,7 @@ enum {
ARG_DUMP_RESAMPLE_METHODS
};
-void dump_resample_methods(void) {
+static void dump_resample_methods(void) {
int i;
for (i = 0; i < PA_RESAMPLER_MAX; i++)
@@ -357,7 +358,7 @@ int main(int argc, char *argv[]) {
pa_resampler *resampler;
pa_memchunk i, j;
- pa_usec_t ts;
+ pa_usec_t ts;
if (verbose) {
printf(_("Compilation CFLAGS: %s\n"), PA_CFLAGS);
@@ -366,20 +367,20 @@ int main(int argc, char *argv[]) {
b.rate, b.channels, pa_sample_format_to_string(b.format));
}
- ts = pa_rtclock_usec();
+ ts = pa_rtclock_now();
pa_assert_se(resampler = pa_resampler_new(pool, &a, NULL, &b, NULL, method, 0));
- printf("init: %llu\n", pa_rtclock_usec() - ts);
+ printf("init: %llu\n", pa_rtclock_now() - ts);
i.memblock = pa_memblock_new(pool, pa_usec_to_bytes(1*PA_USEC_PER_SEC, &a) / pa_frame_size(&a));
- ts = pa_rtclock_usec();
+ ts = pa_rtclock_now();
i.length = pa_memblock_get_length(i.memblock);
i.index = 0;
while (seconds--) {
pa_resampler_run(resampler, &i, &j);
pa_memblock_unref(j.memblock);
}
- printf("resampling: %llu\n", pa_rtclock_usec() - ts);
+ printf("resampling: %llu\n", pa_rtclock_now() - ts);
pa_memblock_unref(i.memblock);
pa_resampler_free(resampler);
--
1.5.6.3
|