Avoid a function call to get the channel count

This commit is contained in:
Chris Robinson
2020-03-18 04:08:26 -07:00
parent 7805179313
commit ad98895876
+1 -1
View File
@@ -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)