aboutsummaryrefslogtreecommitdiffhomepage
path: root/test
diff options
context:
space:
mode:
authorPaul Adenot <[email protected]>2016-03-23 18:45:20 +0100
committerPaul Adenot <[email protected]>2016-03-23 18:47:33 +0100
commitd94d17f7de82f0cf38e27816c122eedb24fad1ac (patch)
tree98607829f1bbf25ebede6a8f27b0fb3c6ef9408f /test
parent481f6b8b9facfbb229b72c5289cfd0eceb1ffd6b (diff)
downloadcubeb-d94d17f7de82f0cf38e27816c122eedb24fad1ac.tar.gz
cubeb-d94d17f7de82f0cf38e27816c122eedb24fad1ac.zip
Fix warnings in test_resampler.cpp.
Diffstat (limited to 'test')
-rw-r--r--test/test_resampler.cpp10
1 files changed, 4 insertions, 6 deletions
diff --git a/test/test_resampler.cpp b/test/test_resampler.cpp
index 81c9fd6..cfc5fb0 100644
--- a/test/test_resampler.cpp
+++ b/test/test_resampler.cpp
@@ -5,9 +5,6 @@
* accompanying file LICENSE for details.
*/
-#define OUTSIDE_SPEEX
-#define RANDOM_PREFIX speex
-
#include "cubeb_resampler_internal.h"
#include <assert.h>
#include <stdio.h>
@@ -345,7 +342,6 @@ void test_resampler_duplex(uint32_t input_channels, uint32_t output_channels,
const uint32_t duration_s = 2;
int32_t duration_frames = duration_s * target_rate;
- uint32_t resampled_chunk_frame_count = chunk_duration * target_rate / 1000;
uint32_t input_array_frame_count = ceil(chunk_duration * input_rate / 1000) + ceilf(static_cast<float>(input_rate) / target_rate) * 2;
uint32_t output_array_frame_count = chunk_duration * output_rate / 1000;
auto_array<float> input_buffer(input_channels * input_array_frame_count);
@@ -486,13 +482,15 @@ void test_output_only_noop()
test_output_only_noop_data_cb, nullptr,
CUBEB_RESAMPLER_QUALITY_VOIP);
- long out_frames = 128;
+ const long out_frames = 128;
float out_buffer[out_frames];
long got;
got = cubeb_resampler_fill(resampler, nullptr, nullptr,
out_buffer, out_frames);
+ assert(got == out_frames);
+
cubeb_resampler_destroy(resampler);
}
@@ -520,7 +518,7 @@ void test_resampler_drain()
test_drain_data_cb, nullptr,
CUBEB_RESAMPLER_QUALITY_VOIP);
- long out_frames = 128;
+ const long out_frames = 128;
float out_buffer[out_frames];
long got;