aboutsummaryrefslogtreecommitdiffstats
path: root/alc/backends/winmm.cpp
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2021-10-05 03:02:45 -0700
committerChris Robinson <[email protected]>2021-10-05 03:02:45 -0700
commit86abe8dca275abf1eed8989395ddad29a18963fd (patch)
tree36dd73cd75db5806c2df8a8d37f5a899385d1e11 /alc/backends/winmm.cpp
parent90cfd090d6fc03f2cf63632bbd5d5deb9c2e5e56 (diff)
Fix the render step value for WinMM
Diffstat (limited to 'alc/backends/winmm.cpp')
-rw-r--r--alc/backends/winmm.cpp4
1 files changed, 1 insertions, 3 deletions
diff --git a/alc/backends/winmm.cpp b/alc/backends/winmm.cpp
index e0e82283..0fdd8a02 100644
--- a/alc/backends/winmm.cpp
+++ b/alc/backends/winmm.cpp
@@ -181,8 +181,6 @@ FORCE_ALIGN int WinMMPlayback::mixerProc()
SetRTPriority();
althrd_setname(MIXER_THREAD_NAME);
- const size_t frame_step{mDevice->bytesFromFmt() * mFormat.nChannels};
-
while(!mKillNow.load(std::memory_order_acquire)
&& mDevice->Connected.load(std::memory_order_acquire))
{
@@ -198,7 +196,7 @@ FORCE_ALIGN int WinMMPlayback::mixerProc()
WAVEHDR &waveHdr = mWaveBuffer[widx];
if(++widx == mWaveBuffer.size()) widx = 0;
- mDevice->renderSamples(waveHdr.lpData, mDevice->UpdateSize, frame_step);
+ mDevice->renderSamples(waveHdr.lpData, mDevice->UpdateSize, mFormat.nChannels);
mWritable.fetch_sub(1, std::memory_order_acq_rel);
waveOutWrite(mOutHdl, &waveHdr, sizeof(WAVEHDR));
} while(--todo);