Skip to content

PlayerAudioController

Guribo edited this page Jul 5, 2026 · 3 revisions

PlayerAudioController

Packages/tlp.udonvoiceutils/Runtime/Core/PlayerAudio/PlayerAudioController.cs

The core controller that manages all player audio in the world.

Overview

PlayerAudioController is a UdonSharp component implementing the Controller role in the MVC pattern (extends TLP.UdonUtils.Runtime.DesignPatterns.MVC.Controller).

It:

  • updates the voice and avatar audio settings using the VRCPlayerApi of each player in the current world
    • with the exception of ignored players
  • updates players in a time-sliced manner, at least one player during each rendered frame (configurable via PlayerUpdateRate)
  • reduces voice and avatar audio ranges based on player or environment occlusion
  • reduces voice and avatar audio ranges based on local player head rotation to emitting other player head position (listener directionality)
  • reduces voice and avatar audio ranges based on emitting other player head rotation to local player head position (player directionality)
  • applies voice and avatar override settings from PlayerAudioOverride components
  • mutes players in private channels (except those in the same channel as the local player)
  • mutes players that are not in a private channel if DisallowListeningToChannel is enabled on the corresponding override
  • can optionally synchronize the global default settings with the instance master via SyncedMasterConfiguration
  • supports adjusting the global default settings via UI (uses PlayerAudioView)

Dependencies

Field Type Purpose
LocalPlayerOverrideList PlayerAudioOverrideList Override list for the local player
MainAudioReverbFilter AudioReverbFilter Reverb filter on the main audio listener
PlayerOverrideListPool Pool Object pool for override lists
PlayerOcclusionStrategy PlayerOcclusionStrategy Occlusion strategy (default or custom)
IgnoredPlayers IgnoredPlayers Players excluded from audio processing
Menu View Optional UI view (PlayerAudioView)

Configuration

Field Type Purpose
LocalConfiguration PlayerAudioConfigurationModel Local player's audio settings
SyncedMasterConfiguration PlayerAudioConfigurationModel Instance master's synced settings
DefaultConfiguration PlayerAudioConfigurationModel Reset-to-defaults values

Settings

Field Default Description
PlayerUpdateRate 1 How many players to update per frame. 0 = all players every frame (performance risk)

Execution Order

The controller runs after all other audio components (PlayerAudioOverrideList, PlayerOcclusionStrategy, PlayerAudioOverride), processing players in time-sliced fashion.

Related

Clone this wiki locally