UnityRenderStreaming
UnityRenderStreaming copied to clipboard
[BUG]: Audio not picked up when BypassListenerEffects checked
Package version
3.1.0-exp.6
Environment
* OS: Windows 10
* Unity version: 2021.3
* Browser: Chrome 110.0.5481.97
Steps To Reproduce
- Using a setup with an AudioStreamSender, use an AudioListener (presumably on main camera)
- Add and configure an AudioSource to play in loop, check BypassListenerEffects
- Start stream
Current Behavior
No audio reaches the browser. Even though the AudioListener seems to pick it up: Disabling the AudioListener component mutes the audio.
Expected Behavior
Audio is picked up regardless of this setting.
Anything else?
No response
@krisrok Hi, is this issue occured by the Bypass Listener Effects parameter?
@karasusan Yes exactly.
I guess it is because the AudioStreamSender uses the API usually used by effects (using one of Unity's magic methods OnAudioFilterRead
).
Just realized this is part of the Unity.WebRTC package.
@krisrok your issue may be same below. https://github.com/Unity-Technologies/com.unity.webrtc/issues/834
May be related but those are different sides of the API?
In case of the issue you referenced it's about feeding samples to Unity. The problem of this is the sound will not be spatial. This is as well as the workaround known for quite a while.
The issue at hand here is reading samples from Unity though.
But I think we can agree on the OnAudioFilterRead
based API not being great for either task.
@krisrok
Surely there would be some issues using OnAudioFilterRead
method for these features.