Jump to content

Pausing/Resuming audio channels individually


Recommended Posts

Hi I'm new here but I have a few audio requirements I need help with implementing:

  1. Individual audio channels I can pause/unpause or mute/unmute separately. 
  2. Means to pause/unpause all channels at once.

Use example:

I have enemies that play a footstep loop as they move. If they stop to attack, the footstep loop needs to stop and the attack sound needs to play. Enemies are currently on individual timers(enemy A will move 5 seconds then attack, move 5 seconds then attack, etc)

If that enemy is killed, that enemy's current sound should be stopped and replaced with the death sound. 

I want the game to have a pause feature. That needs to affect all sounds in play from enemy SFX, player SFX and the BGM. 

Links to samples, code snippets are all greatly appreciated. 

I'm using Phaser 2.6.2 and Web Audio. 

Kind regards. 

Link to comment
Share on other sites


  • Recently Browsing   0 members

    • No registered users viewing this page.
  • Create New...