Ask about the "mac pro sound rendering" question

68 views
Skip to first unread message

qidong liang

unread,
Dec 4, 2021, 2:47:51 PM12/4/21
to discuss-webrtc
Reading the audio_device_mac.cc code of webrtc mac, I don’t understand why this is done? The code is as follows:
if (_macBookProPanRight
&& (_playChannels == 2)) {
// Mix entirely into the right channel and zero the left channel.
SInt32 sampleInt32 = 0;
for (uint32_t sampleIdx = 0; sampleIdx < nOutSamples; sampleIdx += 2) {
sampleInt32 = pPlayBuffer[sampleIdx];
sampleInt32 += pPlayBuffer[sampleIdx + 1];
sampleInt32 /= 2;

if (sampleInt32 > 32767) {
sampleInt32 = 32767;
} else if (sampleInt32 < -32768) {
sampleInt32 = -32768;
}

pPlayBuffer[sampleIdx] = 0;
pPlayBuffer[sampleIdx + 1] = static_cast<SInt16>(sampleInt32);
}
}

Jozsef Vass

unread,
Dec 15, 2021, 10:16:46 PM12/15/21
to discuss...@googlegroups.com
I am pretty sure it is done since the microphone is under the left speaker and it helps echo cancellation.


--

---
You received this message because you are subscribed to the Google Groups "discuss-webrtc" group.
To unsubscribe from this group and stop receiving emails from it, send an email to discuss-webrt...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/discuss-webrtc/27e7145c-ab88-410c-8d32-0ffff847c0d5n%40googlegroups.com.
Message has been deleted

qidong liang

unread,
Dec 28, 2021, 4:06:00 AM12/28/21
to discuss-webrtc
Thank you very much for your answer. I tested and found that the webrtc version used by Google Chrome is MAC pro. There is sound in both the left and right channels. Is the client for a better compatible meeting scene?
Reply all
Reply to author
Forward
0 new messages