mirror of
https://gitlab.freedesktop.org/pulseaudio/pulseaudio.git
synced 2025-11-10 13:29:58 -05:00
tests: Fix resampler-test.
This has been broken since c376ac5920 when run
without any arguments. Passing in -v (verbose) caused the test to work fine.
I think this oversight is just a thinko in the original work but it obviously
broke 'make check' and thus distcheck.
Also fix a couple compiler warnings.
This commit is contained in:
parent
26b4bd74aa
commit
3e0332b071
1 changed files with 3 additions and 4 deletions
|
|
@ -346,7 +346,6 @@ int main(int argc, char *argv[]) {
|
||||||
case 'v':
|
case 'v':
|
||||||
pa_log_set_level(PA_LOG_DEBUG);
|
pa_log_set_level(PA_LOG_DEBUG);
|
||||||
verbose = 1;
|
verbose = 1;
|
||||||
ret = 0;
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case ARG_VERSION:
|
case ARG_VERSION:
|
||||||
|
|
@ -403,6 +402,7 @@ int main(int argc, char *argv[]) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
ret = 0;
|
||||||
pa_assert_se(pool = pa_mempool_new(FALSE, 0));
|
pa_assert_se(pool = pa_mempool_new(FALSE, 0));
|
||||||
|
|
||||||
if (!all_formats) {
|
if (!all_formats) {
|
||||||
|
|
@ -420,7 +420,7 @@ int main(int argc, char *argv[]) {
|
||||||
|
|
||||||
ts = pa_rtclock_now();
|
ts = pa_rtclock_now();
|
||||||
pa_assert_se(resampler = pa_resampler_new(pool, &a, NULL, &b, NULL, method, 0));
|
pa_assert_se(resampler = pa_resampler_new(pool, &a, NULL, &b, NULL, method, 0));
|
||||||
printf("init: %llu\n", pa_rtclock_now() - ts);
|
printf("init: %llu\n", (long long unsigned)(pa_rtclock_now() - ts));
|
||||||
|
|
||||||
i.memblock = pa_memblock_new(pool, pa_usec_to_bytes(1*PA_USEC_PER_SEC, &a) / pa_frame_size(&a));
|
i.memblock = pa_memblock_new(pool, pa_usec_to_bytes(1*PA_USEC_PER_SEC, &a) / pa_frame_size(&a));
|
||||||
|
|
||||||
|
|
@ -431,12 +431,11 @@ int main(int argc, char *argv[]) {
|
||||||
pa_resampler_run(resampler, &i, &j);
|
pa_resampler_run(resampler, &i, &j);
|
||||||
pa_memblock_unref(j.memblock);
|
pa_memblock_unref(j.memblock);
|
||||||
}
|
}
|
||||||
printf("resampling: %llu\n", pa_rtclock_now() - ts);
|
printf("resampling: %llu\n", (long long unsigned)(pa_rtclock_now() - ts));
|
||||||
pa_memblock_unref(i.memblock);
|
pa_memblock_unref(i.memblock);
|
||||||
|
|
||||||
pa_resampler_free(resampler);
|
pa_resampler_free(resampler);
|
||||||
|
|
||||||
ret = 0;
|
|
||||||
goto quit;
|
goto quit;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue