From 005674c805a6ac7ef2ad5e8719903353afdfce80 Mon Sep 17 00:00:00 2001 From: cloudwebrtc Date: Tue, 16 Apr 2024 10:39:14 +0800 Subject: [PATCH] Don't play the rtc audio source locally. --- Runtime/Scripts/AudioSource.cs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Runtime/Scripts/AudioSource.cs b/Runtime/Scripts/AudioSource.cs index 1d71733..bf2b3fb 100644 --- a/Runtime/Scripts/AudioSource.cs +++ b/Runtime/Scripts/AudioSource.cs @@ -149,6 +149,9 @@ private void OnAudioRead(float[] data, int channels, int sampleRate) _sampleRate = sampleRate; _pending = true; } + + // Don't play the audio locally + Array.Clear(data, 0, data.Length); } } }