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

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

  • Recently Browsing   0 members

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