Commit 5b6f8065 authored by Sébastien Gonzalve's avatar Sébastien Gonzalve Committed by Arjan Spieard

Fix types in std::min() that fails when size_t is not 64bits

parent 17c738ed
......@@ -79,7 +79,7 @@ void AudioBuffer::operator()(const std::int16_t *data, size_t count, int64_t sam
}
m_write_pos = sample_position;
auto write_pos_in_ring = m_write_pos % m_data.size();
size_t write_pos_in_ring = m_write_pos % m_data.size();
auto first_hunk_size = std::min(count, m_data.size() - write_pos_in_ring);
std::copy(data, data + first_hunk_size, m_data.begin() + write_pos_in_ring);
// second part is when data wrapped in the ring buffer
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment