mirror of
https://github.com/mumble-voip/mumble.git
synced 2025-10-26 11:19:16 +00:00
FIX(client, plugins): Wrong sample count in plugin callback
In the mumble_onAudioInput callback that plugins can use, the sampleCount parameter was actually wrong for all cases in which the input had more than a single channel. Instead of the sample count per channel, the total sample count (across all channels) was passed along. Fixes #6464
This commit is contained in:
parent
325e70e8e8
commit
e48dd5cdb7
@ -1092,7 +1092,9 @@ void AudioInput::encodeAudioFrame(AudioChunk chunk) {
|
||||
EncodingOutputBuffer buffer;
|
||||
Q_ASSERT(buffer.size() >= static_cast< size_t >(iAudioQuality / 100 * iAudioFrames / 8));
|
||||
|
||||
emit audioInputEncountered(psSource, iFrameSize, iMicChannels, SAMPLE_RATE, bIsSpeech);
|
||||
assert(iFrameSize % iMicChannels == 0);
|
||||
const unsigned int samplesPerChannel = iFrameSize / iMicChannels;
|
||||
emit audioInputEncountered(psSource, samplesPerChannel, iMicChannels, SAMPLE_RATE, bIsSpeech);
|
||||
|
||||
int len = 0;
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user