WASAPI fix

This commit is contained in:
Jack Andersen 2017-12-03 17:20:54 -10:00
parent 489e7e671b
commit 598bce028b
1 changed files with 6 additions and 4 deletions

View File

@ -326,10 +326,12 @@ struct WASAPIAudioVoiceEngine : BaseAudioVoiceEngine
if (m_mixInfo.m_sampleFormat != oldFmt) if (m_mixInfo.m_sampleFormat != oldFmt)
Log.report(logvisor::Fatal, L"audio device sample format changed, boo doesn't support this!!"); Log.report(logvisor::Fatal, L"audio device sample format changed, boo doesn't support this!!");
for (AudioVoice* vox : m_activeVoices) if (m_voiceHead)
vox->_resetSampleRate(vox->m_sampleRateIn); for (AudioVoice& vox : *m_voiceHead)
for (AudioSubmix* smx : m_activeSubmixes) vox._resetSampleRate(vox.m_sampleRateIn);
smx->_resetOutputSampleRate(); if (m_submixHead)
for (AudioSubmix& smx : *m_submixHead)
smx._resetOutputSampleRate();
} }
void pumpAndMixVoices() void pumpAndMixVoices()