rex_audio_helper
Introduction
This plugin provides some helper methods of audio.
This plugin provides some helper methods of audio.
Usage
Play with fade-in, stop with fade-out, change volume smoothly
Sample capx
"Action:Play", or "Action:Play (by name)" could play audio file with fade-in, the volume will be increased from the minimum to target volume.
"Action:Stop" could fade-out audio from current volume to minimum, then stop it automatically.
"Action:Set volume" could change current volume to target volume smoothly.
"Action:Set paused" could pause with fade-out, or resume with fade-in.
Sample capx
"Action:Play", or "Action:Play (by name)" could play audio file with fade-in, the volume will be increased from the minimum to target volume.
"Action:Stop" could fade-out audio from current volume to minimum, then stop it automatically.
"Action:Set volume" could change current volume to target volume smoothly.
"Action:Set paused" could pause with fade-out, or resume with fade-in.
Map volume to db
The maximum volume is defined to 1, it will map to 0db.
The minimum volume is defined to 0, it will map to -60db.
Parameter "Start volume" or "Stop volume" in these actions could be number or "dB" in string.
The maximum volume is defined to 1, it will map to 0db.
The minimum volume is defined to 0, it will map to -60db.
Parameter "Start volume" or "Stop volume" in these actions could be number or "dB" in string.
number: 0
string: "-60dB"
Uses audio effect
Set property "Audio effect" to "Yes" to fade in or fade out sound by audio effect, if web audio is supported. Otherwise, it will fade by setting volume every tick.
Set property "Audio effect" to "Yes" to fade in or fade out sound by audio effect, if web audio is supported. Otherwise, it will fade by setting volume every tick.
Preload
"Action:Preload" could preload audio by its string name.
"Action:Preload" could preload audio by its string name.