Jump to content

Extended Sound Class adds a filter but it only works when the game loses focus.


codevinsky
 Share

Recommended Posts

Using the demo I was writing earlier today:

 

http://codepen.io/codevinsky/pen/xaAfl

 

The sound properly slows down, but the low pass filter only takes effect when the game loses focus. 

 

To reproduce: Load the link, wait for the music to start, make sure the game window is in focus, press the space bar, wait for it to drop to the slow speed, and then click somewhere outside of the game or create a new tab. You'll hear the filter immediately kick in at that point, when the game regains focus, the filter is completely lost.

 

Rich, or anybody who knows: Can you tell me what happens when the game loses focus that would cause this strange behavior?

Link to comment
Share on other sites

I can reproduce your issue, but I have no clue to that causes it or how to fix it.

 

What I do have is a request for you; when you get it working, please make this is into an audio filter library (or Phaser plugin)! The demo that you have made is already extremely cool by itself! :)

Link to comment
Share on other sites

 Share

  • Recently Browsing   0 members

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