microscopic-church-61321
08/30/2025, 5:46 PMtall-airline-16756
08/30/2025, 5:46 PMtall-airline-16756
08/30/2025, 5:47 PMAudioSource component, which handles spatialization features like 3D rolloff and Doppler effects. Here’s how you can get spatial audio working:
• Make sure the AudioSource component has spatialization turned on by setting its Spatial Blend to 3D.
• Tweak settings like rolloff scale and Doppler factor to get the sound just right.
• Keep the AudioSource position updated dynamically to match where participants are in your scene.
If you want, I’m happy to share detailed steps or some code examples to help you get started! Just let me know. Sources: Samples~/Basic/ProjectSettings/ProjectSettings.asset | TestProject~/ProjectSettings/AudioManager.asset | Real-time audio and video in the Metaverse | Real-time audio and video in the Metaverse | src/controller/SpatialAudioController.tsxmicroscopic-church-61321
08/30/2025, 5:50 PMtall-airline-16756
08/30/2025, 5:51 PMAudioSource settings aren’t affecting the received audio, it might be because of how the LiveKit Unity SDK handles remote audio. The SDK connects the incoming audio streams straight to the AudioSource component, but some settings—like volume tweaks or spatialization—might not kick in automatically. Here are a few things you can try:
• Make sure the AudioSource is properly linked to the AudioStream and is active in your scene.
• Double-check if the SDK is overriding or resetting the AudioSource component during playback.
• Try adjusting the AudioSource properties through a script after the AudioStream has initialized to see if your changes take effect.
If you’re still running into trouble, just let me know—I’m here to help! Sources: Runtime/Scripts/Proto/AudioFrame.csmicroscopic-church-61321
09/02/2025, 6:24 PMtall-airline-16756
09/02/2025, 6:24 PMAudioSource might not work quite as you'd expect with the LiveKit Unity SDK because the SDK handles audio through WebRTC, which skips over Unity's usual spatialization system. So, Unity's spatial audio settings won’t be applied to the audio streams you receive.
But don’t worry! To get those spatial audio effects, you can:
• Manually tweak the position and volume of the AudioSource in your scene to create a spatial feel.
• Use external DSP or audio mixing tools if you want more advanced spatialization options.
If you want, I’m here to help guide you through making these adjustments—just let me know! Sources: Runtime/Scripts/Proto/AudioFrame.cs | src/controller/SpatialAudioController.tsx | LivekitUnitySampleApp/Assets/LivekitSamples.cs | Using WebRTC + React + WebAudio to create spatial audiomicroscopic-church-61321
09/02/2025, 6:26 PMtall-airline-16756
09/02/2025, 6:27 PMAudioSource has Spatial Blend set to 1.0 (that means fully 3D).
• Keep the AudioSource position updated dynamically so it matches where the remote participant is in your scene.
• Tweak settings like rolloff mode, min distance, and max distance to get that nice, natural volume drop-off.
Unity’s audio engine will take care of stereo panning and volume changes based on where the AudioListener and AudioSource are in relation to each other. If you want, I’m happy to share some detailed code examples or help you out further—just let me know! Sources: README.md | LivekitUnitySampleApp/ProjectSettings/AudioManager.asset | README.md | Runtime/Scripts/Proto/AudioFrame.csmicroscopic-church-61321
09/02/2025, 6:29 PMmicroscopic-church-61321
09/02/2025, 6:35 PMmicroscopic-church-61321
09/02/2025, 6:40 PMmicroscopic-church-61321
09/02/2025, 6:40 PM