diff options
Diffstat (limited to '')
-rw-r--r-- | src/audio_core/audio_renderer.cpp | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/audio_core/audio_renderer.cpp b/src/audio_core/audio_renderer.cpp index 2e59894ab..2683f3a5f 100644 --- a/src/audio_core/audio_renderer.cpp +++ b/src/audio_core/audio_renderer.cpp @@ -285,8 +285,11 @@ void AudioRenderer::VoiceState::RefreshBuffer() { break; } - samples = - Interpolate(interp_state, std::move(samples), GetInfo().sample_rate, STREAM_SAMPLE_RATE); + // Only interpolate when necessary, expensive. + if (GetInfo().sample_rate != STREAM_SAMPLE_RATE) { + samples = Interpolate(interp_state, std::move(samples), GetInfo().sample_rate, + STREAM_SAMPLE_RATE); + } is_refresh_pending = false; } |