Capítulo 302 de 859
The class represents a virtual listener of the all positional and non-positional audio effects in the scene. A three.js application usually creates a single listener. It is a mandatory constructor parameter for audios entities like Audio and PositionalAudio.
In most cases, the listener object is a child of the camera. So the 3D transformation of the camera represents the 3D transformation of the listener.
linearRampToValueAtTime() usage.Constructor
| Signature |
|---|
new AudioListener() |
Properties
| Property | Description |
|---|---|
.context : AudioContext (readonly) | The native audio context. |
.filter : AudioNode (readonly) | An optional filter. |
.gain : GainNode (readonly) | The gain node used for volume control. |
.timeDelta : number (readonly) | Time delta values required for linearRampToValueAtTime() usage. |
Methods
| Method | Description |
|---|---|
.getFilter() : AudioNode | Returns the current set filter. |
.getInput() : GainNode | Returns the listener's input node. |
.getMasterVolume() : number | Returns the applications master volume. |
.removeFilter() : AudioListener | Removes the current filter from this listener. |
.setFilter( value : AudioNode ) : AudioListener | Sets the given filter to this listener. |
.setMasterVolume( value : number ) : AudioListener | Sets the applications master volume. This volume setting affects all audio nodes in the scene. |