don't blow away a channel on local injection loopback

This commit is contained in:
Stephen Birarda 2013-12-16 16:57:30 -08:00
parent efe05adcae
commit a31f15ee79

View file

@ -438,7 +438,8 @@ void Audio::addReceivedAudioToBuffer(const QByteArray& audioByteArray) {
for (int i = 0; i < NETWORK_BUFFER_LENGTH_SAMPLES_PER_CHANNEL; i++) {
ringBufferSamples[i * 2] = glm::clamp(ringBufferSamples[i * 2] + _localInjectedSamples[i],
MIN_SAMPLE_VALUE, MAX_SAMPLE_VALUE);
ringBufferSamples[(i * 2) + 1] = ringBufferSamples[i * 2];
ringBufferSamples[(i * 2) + 1] += glm::clamp(ringBufferSamples[(i * 2) + 1] + _localInjectedSamples[i],
MIN_SAMPLE_VALUE, MAX_SAMPLE_VALUE);
}
// copy the packet from the RB to the output