Rex's plugins for Construct2
  • Home
  • Map
  • Tutorial/Templates
  • News
  • About

rex_audio_helper

Plugin, ACE table, Discussion thread
Dependence: official audio plugin

Introduction
This plugin provides some helper methods of audio.

Usage
Prepare
Remember to put official audio plugin into project.

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.
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.
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.

Preload
"Action:Preload" could preload audio by its string name.

Create a free web site with Weebly
  • Home
  • Map
  • Tutorial/Templates
  • News
  • About