
A utility class to mix between two sounds.
Kind: global class
SoundInstanceSoundInstanceNumberCreate the sound mixer.
| Param | Type | Description |
|---|---|---|
| sound1 | SoundInstance |
Sound to mix from. Can be null to just fade in. |
| sound2 | SoundInstance |
Sound to mix to. Can be null to just fade out. |
| allowOverlapping | Boolean |
If true (default), will mix while overlapping sounds. If false, will first finish first sound before begining next. |
SoundInstanceGet first sound.
Kind: instance property of SoundMixer
Returns: SoundInstance - First sound instance.
SoundInstanceGet second sound.
Kind: instance property of SoundMixer
Returns: SoundInstance - Second sound instance.
NumberReturn current progress.
Kind: instance property of SoundMixer
Returns: Number - Mix progress from 0 to 1.
Stop both sounds.
Kind: instance method of SoundMixer
Update the mixer progress with time delta instead of absolute value.
Kind: instance method of SoundMixer
| Param | Type | Description |
|---|---|---|
| delta | Number |
Progress delta, in seconds. |
Update the mixer progress.
Kind: instance method of SoundMixer
| Param | Type | Description |
|---|---|---|
| progress | Number |
Transition progress from sound1 to sound2. Values must be between 0.0 to 1.0. |