[beast] TESTS: made resamplehandle test signal shorter -> better performance
- From: Stefan Westerfeld <stw src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [beast] TESTS: made resamplehandle test signal shorter -> better performance
- Date: Sun, 20 Feb 2011 21:11:48 +0000 (UTC)
commit 95cd9a71f9d7c9a9a81e3e5f26edc7dc6576e3bb
Author: Stefan Westerfeld <stefan space twc de>
Date: Sun Feb 20 23:00:40 2011 +0100
TESTS: made resamplehandle test signal shorter -> better performance
bse/tests/resamplehandle.cc | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
---
diff --git a/bse/tests/resamplehandle.cc b/bse/tests/resamplehandle.cc
index c7c454c..f0d838b 100644
--- a/bse/tests/resamplehandle.cc
+++ b/bse/tests/resamplehandle.cc
@@ -106,7 +106,7 @@ check (const char *up_down,
for (int64 i = 0; i < rhandle->setup.n_values; i++)
{
double resampled = gsl_data_handle_peek_value (rhandle, i, &peek_buffer);
- worst_diff = max (resampled - expected[i], worst_diff);
+ worst_diff = max (fabs (resampled - expected[i]), worst_diff);
}
worst_diff_db = bse_db_from_factor (worst_diff, -200);
TPRINT ("linear(%dst read) read worst_diff = %f (%f dB)\n", repeat, worst_diff, worst_diff_db);
@@ -125,7 +125,7 @@ check (const char *up_down,
for (int64 i = start; i < std::min (start + len, rhandle->setup.n_values); i++)
{
double resampled = gsl_data_handle_peek_value (rhandle, i, &peek_buffer);
- worst_diff = max (resampled - expected[i], worst_diff);
+ worst_diff = max (fabs (resampled - expected[i]), worst_diff);
}
}
worst_diff_db = bse_db_from_factor (worst_diff, -200);
@@ -232,7 +232,7 @@ run_tests (const char *run_type)
for (int p = 0; params[p].bits; p++)
{
- const int LEN = 44100 * 4;
+ const int LEN = 44100 / 2; /* 500ms test signal */
vector<float> input;
vector<double> expected;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]