diff options
author | Chris Robinson <[email protected]> | 2020-03-18 04:08:26 -0700 |
---|---|---|
committer | Chris Robinson <[email protected]> | 2020-03-18 04:08:26 -0700 |
commit | ad988958767f222625f2560cd628642c948cd736 (patch) | |
tree | 126f2d040453e9be885456d5e6b0f3a42e6d39e5 /alc/backends | |
parent | 7805179313964157f0796985cc8c73d533c1898a (diff) |
Avoid a function call to get the channel count
Diffstat (limited to 'alc/backends')
-rw-r--r-- | alc/backends/pulseaudio.cpp | 2 |
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) |