aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--src/cubeb_utils.cpp1
-rw-r--r--test/test_loopback.cpp2
-rw-r--r--tools/cubeb-test.cpp4
3 files changed, 4 insertions, 3 deletions
diff --git a/src/cubeb_utils.cpp b/src/cubeb_utils.cpp
index 85572a9..d42e951 100644
--- a/src/cubeb_utils.cpp
+++ b/src/cubeb_utils.cpp
@@ -19,5 +19,6 @@ size_t cubeb_sample_size(cubeb_sample_format format)
default:
// should never happen as all cases are handled above.
assert(false);
+ return 0;
}
}
diff --git a/test/test_loopback.cpp b/test/test_loopback.cpp
index 2c600ee..9977f6f 100644
--- a/test/test_loopback.cpp
+++ b/test/test_loopback.cpp
@@ -26,7 +26,7 @@
const uint32_t SAMPLE_FREQUENCY = 48000;
const uint32_t TONE_FREQUENCY = 440;
const double OUTPUT_AMPLITUDE = 0.25;
-const uint32_t NUM_FRAMES_TO_OUTPUT = SAMPLE_FREQUENCY / 20; /* play ~50ms of samples */
+const int32_t NUM_FRAMES_TO_OUTPUT = SAMPLE_FREQUENCY / 20; /* play ~50ms of samples */
template<typename T> T ConvertSampleToOutput(double input);
template<> float ConvertSampleToOutput(double input) { return float(input); }
diff --git a/tools/cubeb-test.cpp b/tools/cubeb-test.cpp
index 2edd9f4..e5d975f 100644
--- a/tools/cubeb-test.cpp
+++ b/tools/cubeb-test.cpp
@@ -265,7 +265,7 @@ long cubeb_client::user_data_cb(cubeb_stream* stm, void* user,
const float* in = static_cast<const float*>(input_buffer);
float* out = static_cast<float*>(output_buffer);
if (_latency_testing) {
- for (uint32_t i = 0; i < nframes; i++) {
+ for (int32_t i = 0; i < nframes; i++) {
// Impulses every second, mixed with the input signal fed back at half
// gain, to measure the input-to-output latency via feedback.
uint32_t clock = ((_total_frames + i) % _rate);
@@ -280,7 +280,7 @@ long cubeb_client::user_data_cb(cubeb_stream* stm, void* user,
}
}
} else {
- for (uint32_t i = 0; i < nframes; i++) {
+ for (int32_t i = 0; i < nframes; i++) {
for (uint32_t j = 0; j < _channels; j++) {
out[i * _channels + j] = in[i];
}