Avoid a function call to get the channel count
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user