Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix a few warnings #571

Merged
merged 1 commit into from
Jan 22, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions src/cubeb_utils.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
}
2 changes: 1 addition & 1 deletion test/test_loopback.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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); }
Expand Down
4 changes: 2 additions & 2 deletions tools/cubeb-test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand All @@ -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];
}
Expand Down