Skip to content

Commit

Permalink
More compiler warnings fixups.
Browse files Browse the repository at this point in the history
  • Loading branch information
cboulay committed Mar 27, 2022
1 parent bd012c3 commit e505ded
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions examples/SendDataInChunks.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ struct fake_device {
std::size_t n_channels;
double srate;
std::size_t pattern_samples;
int64_t head;
std::size_t head;
std::vector<int16_t> pattern;
std::chrono::steady_clock::time_point last_time;

Expand Down Expand Up @@ -72,7 +72,7 @@ struct fake_device {
auto elapsed_nano =
std::chrono::duration_cast<std::chrono::nanoseconds>(now - last_time).count();
std::size_t elapsed_samples = std::size_t(elapsed_nano * srate * 1e-9); // truncate OK.
elapsed_samples = std::min(elapsed_samples, (uint64_t)(buffer.size() / n_channels));
elapsed_samples = std::min(elapsed_samples, (std::size_t)(buffer.size() / n_channels));
if (nodata) {
// The fastest but no patterns.
// memset(&buffer[0], 23, buffer.size() * sizeof buffer[0]);
Expand Down

0 comments on commit e505ded

Please sign in to comment.