# Speaker

The `Speaker` class encapsulates an speaker for a scene. Old class name is `AudioSource`.

## Properties

| Property | Description                                                                                                                                                                                                                                                                                                             |
| -------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `volume` | <p><code>(get) volume: ScalarValue (set) volume: ScalarSignal</code></p><p>(get) Returns the volume of the speaker in the range of \[0.0, 1.0]. (set) Specifies the volume of the speaker in the range of \[0.0, 1.0].</p><p>Note: To access this property you need to enable the AudioSourceVolume API capability.</p> |

## Methods

| Method    | Description                                                                                                          |
| --------- | -------------------------------------------------------------------------------------------------------------------- |
| `play`    | <p><code>play(): void</code></p><p>Creates a new playing instance of the sound associated with this AudioSource.</p> |
| `stopAll` | <p><code>stopAll(speaker: Speaker): void</code></p><p>Stops all playing instances of this AudioSource.</p>           |
