aboutsummaryrefslogtreecommitdiffstats
path: root/alc/backends
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2020-03-18 04:08:26 -0700
committerChris Robinson <[email protected]>2020-03-18 04:08:26 -0700
commitad988958767f222625f2560cd628642c948cd736 (patch)
tree126f2d040453e9be885456d5e6b0f3a42e6d39e5 /alc/backends
parent7805179313964157f0796985cc8c73d533c1898a (diff)
Avoid a function call to get the channel count
Diffstat (limited to 'alc/backends')
-rw-r--r--alc/backends/pulseaudio.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/alc/backends/pulseaudio.cpp b/alc/backends/pulseaudio.cpp
index 7236c72c..1ab04a9c 100644
--- a/alc/backends/pulseaudio.cpp
+++ b/alc/backends/pulseaudio.cpp
@@ -764,7 +764,7 @@ void PulsePlayback::streamStateCallback(pa_stream *stream) noexcept
void PulsePlayback::streamWriteCallback(pa_stream *stream, size_t nbytes) noexcept
{
void *buf{pa_xmalloc(nbytes)};
- aluMixData(mDevice, buf, static_cast<ALuint>(nbytes/mFrameSize), mDevice->channelsFromFmt());
+ aluMixData(mDevice, buf, static_cast<ALuint>(nbytes/mFrameSize), mSpec.channels);
int ret{pa_stream_write(stream, buf, nbytes, pa_xfree, 0, PA_SEEK_RELATIVE)};
if UNLIKELY(ret != PA_OK)