aboutsummaryrefslogtreecommitdiffstats
path: root/alc/backends/wave.cpp
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2019-12-21 20:43:46 -0800
committerChris Robinson <[email protected]>2019-12-21 20:43:46 -0800
commit2e6a55a87ce24a9303c3039609b41fb0eb302483 (patch)
treef3bb706cac1689ac9233da4bdd78a9530b5c078a /alc/backends/wave.cpp
parentc2ca617ed60e26878a6ac10aaf0dc644b6a24d29 (diff)
Handle padding between device sample frames
The padding must be constant and sample type aligned (e.g. some fixed multiple of two bytes between the start of two consecutive frames for 16-bit output). The intent is to always have the ability for stereo output with WASAPI even if the device has some other unsupported configuration, as long as front-left and front-right exist.
Diffstat (limited to 'alc/backends/wave.cpp')
-rw-r--r--alc/backends/wave.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/alc/backends/wave.cpp b/alc/backends/wave.cpp
index 7bcc3436..4f357970 100644
--- a/alc/backends/wave.cpp
+++ b/alc/backends/wave.cpp
@@ -126,6 +126,7 @@ int WaveBackend::mixerProc()
althrd_setname(MIXER_THREAD_NAME);
+ const size_t frameStep{mDevice->channelsFromFmt()};
const ALuint frameSize{mDevice->frameSizeFromFmt()};
int64_t done{0};
@@ -147,7 +148,7 @@ int WaveBackend::mixerProc()
{
{
std::lock_guard<WaveBackend> _{*this};
- aluMixData(mDevice, mBuffer.data(), mDevice->UpdateSize);
+ aluMixData(mDevice, mBuffer.data(), mDevice->UpdateSize, frameStep);
}
done += mDevice->UpdateSize;