diff options
author | Alex Chronopoulos <[email protected]> | 2020-01-22 13:00:49 +0200 |
---|---|---|
committer | Paul Adenot <[email protected]> | 2020-01-22 12:00:49 +0100 |
commit | d4b23d1e9b2857b5c6020c58b183fdd8dbe36921 (patch) | |
tree | f6725127a2f60788eb35813ad3b4892deba2e14f | |
parent | 0adc5ea9650acdbe5e1cc78ee0d0398400350c83 (diff) | |
download | cubeb-d4b23d1e9b2857b5c6020c58b183fdd8dbe36921.tar.gz cubeb-d4b23d1e9b2857b5c6020c58b183fdd8dbe36921.zip |
fix a few warnings (#571)
-rw-r--r-- | src/cubeb_utils.cpp | 1 | ||||
-rw-r--r-- | test/test_loopback.cpp | 2 | ||||
-rw-r--r-- | tools/cubeb-test.cpp | 4 |
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]; } |