summaryrefslogtreecommitdiff
path: root/src/tests
diff options
context:
space:
mode:
authorHui Wang <hui.wang@canonical.com>2015-03-24 10:29:16 +0100
committerDavid Henningsson <david.henningsson@canonical.com>2015-03-30 10:52:30 +0200
commitc36e191ce5d38173424c3db9ba06638fd6b8408e (patch)
tree5629e6d88727f7c6e1898b176f104e3893560731 /src/tests
parent3538e6636edc1ba0b75e7409db618dbb7fe79d3e (diff)
lfe-filter: change the crossover frequency as a parameter
Add a user defined parameter lfe-crossover-freq for the lfe-filter, to pass this parameter to the lfe-filter, we need to change the pa_resampler_new() API as well. Signed-off-by: Hui Wang <hui.wang@canonical.com>
Diffstat (limited to 'src/tests')
-rw-r--r--src/tests/remix-test.c3
-rw-r--r--src/tests/resampler-test.c7
2 files changed, 6 insertions, 4 deletions
diff --git a/src/tests/remix-test.c b/src/tests/remix-test.c
index 5193187bb..6feb8dcf0 100644
--- a/src/tests/remix-test.c
+++ b/src/tests/remix-test.c
@@ -47,6 +47,7 @@ int main(int argc, char *argv[]) {
unsigned i, j;
pa_mempool *pool;
+ unsigned crossover_freq = 120;
pa_log_set_level(PA_LOG_DEBUG);
@@ -66,7 +67,7 @@ int main(int argc, char *argv[]) {
ss1.rate = ss2.rate = 44100;
ss1.format = ss2.format = PA_SAMPLE_S16NE;
- r = pa_resampler_new(pool, &ss1, &maps[i], &ss2, &maps[j], PA_RESAMPLER_AUTO, 0);
+ r = pa_resampler_new(pool, &ss1, &maps[i], &ss2, &maps[j], crossover_freq, PA_RESAMPLER_AUTO, 0);
/* We don't really care for the resampler. We just want to
* see the remixing debug output. */
diff --git a/src/tests/resampler-test.c b/src/tests/resampler-test.c
index 96110fb3b..751d2dc9a 100644
--- a/src/tests/resampler-test.c
+++ b/src/tests/resampler-test.c
@@ -303,6 +303,7 @@ int main(int argc, char *argv[]) {
bool all_formats = true;
pa_resample_method_t method;
int seconds;
+ unsigned crossover_freq = 120;
static const struct option long_options[] = {
{"help", 0, NULL, 'h'},
@@ -419,7 +420,7 @@ int main(int argc, char *argv[]) {
b.rate, b.channels, pa_sample_format_to_string(b.format));
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, crossover_freq, method, 0));
pa_log_info("init: %llu", (long long unsigned)(pa_rtclock_now() - ts));
i.memblock = pa_memblock_new(pool, pa_usec_to_bytes(1*PA_USEC_PER_SEC, &a));
@@ -450,8 +451,8 @@ int main(int argc, char *argv[]) {
pa_sample_format_to_string(b.format),
pa_sample_format_to_string(a.format));
- pa_assert_se(forth = pa_resampler_new(pool, &a, NULL, &b, NULL, method, 0));
- pa_assert_se(back = pa_resampler_new(pool, &b, NULL, &a, NULL, method, 0));
+ pa_assert_se(forth = pa_resampler_new(pool, &a, NULL, &b, NULL, crossover_freq, method, 0));
+ pa_assert_se(back = pa_resampler_new(pool, &b, NULL, &a, NULL, crossover_freq, method, 0));
i.memblock = generate_block(pool, &a);
i.length = pa_memblock_get_length(i.memblock);