Skip to content

Commit 677b37c

Browse files
authored
Add a description for SoundService.DefaultListenerLocation
Adds a description for SoundService.DefaultListenerLocation
1 parent 054420b commit 677b37c

File tree

1 file changed

+23
-2
lines changed

1 file changed

+23
-2
lines changed

content/en-us/reference/engine/classes/SoundService.yaml

Lines changed: 23 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -86,8 +86,29 @@ properties:
8686
capabilities: []
8787
writeCapabilities: []
8888
- name: SoundService.DefaultListenerLocation
89-
summary: ''
90-
description: ''
89+
summary: |
90+
Determines where (if anywhere) to place an `Class.AudioListener` by default.
91+
description: |
92+
Determines where to place an `Class.AudioListener` by default.
93+
If `Class.SoundService.DefaultListenerLocation` is `None`, then no `Class.AudioListener` will be created by default, but `Class.AudioListeners` can be created separately by scripts.
94+
If `Class.SoundService.DefaultListenerLocation` is `Camera`, then
95+
- an `Class.AudioListener` will be created and parented-to `Class.Workspace.CurrentCamera`
96+
- an `Class.AudioDeviceOutput` will be created and parented-to `Class.SoundService`
97+
- a `Class.Wire` will be created and parented-to the previously-created `Class.AudioListener`
98+
- `Class.Wire.SourceInstance` will be set to the previously-created `Class.AudioListener`, and `Class.Wire.TargetInstance` will be set to the previously-created `Class.AudioDeviceOutput`
99+
So, the world will be heard from the perspective (postition and orientation) of your camera.
100+
101+
If `Class.SoundService.DefaultListenerLocation` is `Character`, then
102+
- an `Class.Attachment` will be created and parented-to your `Class.Players.LocalPlayer`'s `Class.Player.Character`'s `Class.Model.PrimaryPart`
103+
- an `Class.AudioListener` will be created and parented-to the `Class.Attachment`
104+
- an `Class.AudioDeviceOutput` will be created and parented-to `Class.SoundService`
105+
- a `Class.Wire` will be created and parented-to the previously-created `Class.AudioListener`
106+
- `Class.Wire.SourceInstance` will be set to the previously-created `Class.AudioListener`, and `Class.Wire.TargetInstance` will be set to the previously-created `Class.AudioDeviceOutput`
107+
- the previously-created `Class.Attachment` will be updated once-per-frame to face the same direction as `Class.Workspace.CurrentCamera`
108+
So, the world will be heard from the position of your character, while matching the orientation of your camera.
109+
110+
If `Class.SoundService.DefaultListenerLocation` is `Default`, then its behavior depends on the value of `Class.VoiceChatService.EnableDefaultVoice` and `Class.VoiceChatService.UseAudioApi`.
111+
When using the default voice setup with the audio API, this behaves similarly to `Camera`.
91112
code_samples: []
92113
type: ListenerLocation
93114
tags: []

0 commit comments

Comments
 (0)