Skip to content

Commit

Permalink
fix mac build
Browse files Browse the repository at this point in the history
  • Loading branch information
phandasm committed Sep 8, 2024
1 parent 78bdc16 commit 95e8ca9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/source_generic.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -328,7 +328,7 @@ void WAVSourceGeneric::tick_waveform([[maybe_unused]] float seconds)
if(ts < m_waveform_ts)
break; // rollover
// TODO: interpolation
const auto index = std::clamp(ns_to_audio_frames(m_audio_info.samples_per_sec, m_audio_ts - ts), reserve_samples + 1, total_samples);
const auto index = std::clamp((uint64_t)ns_to_audio_frames(m_audio_info.samples_per_sec, m_audio_ts - ts), (uint64_t)reserve_samples + 1u, (uint64_t)total_samples);
m_decibels[channel][counts[channel]++] = m_interp_bufs[2][total_samples - index];
}
std::rotate(&m_decibels[channel][0], &m_decibels[channel][counts[channel]], &m_decibels[channel][outsz]);
Expand Down

0 comments on commit 95e8ca9

Please sign in to comment.