Jump to content

Audio fadeIn() not working?


momenimum
 Share

Recommended Posts

Hi, the Audio fadeIn() example and my own tests show that it's not working, it just plays at full volume from the start, even if I set the duration to something very high like 10000.  The opposite fadeOut() seems to be working fine.  Has anyone else experienced this?

Also along with these fading functions I wanted the sound.volume = 0.25 to be kept there even when using the fadeIn() or fadeOut() functions.  For example if I set my music to volume = 0.25, then I tell it to fadeIn() it should fade from 0.0 to 0.25, or fadeOut() from 0.25 to 0.0.  That or maybe put the target volumes in the function such as fadeIn(1000,0.25) and fadeOut(1000,0.25).  Let me know what you think.

https://www.panda2.io/examples#audio-fadeIn

Thanks!

 

Link to comment
Share on other sites

This should be now fixed.

There seems to have something changed in Chromium, since this was working earlier and no changed have been made to fade functions.

If you want to fadeIn your sound into specific volume, just set the volume property before calling fadeIn:

var music = new game.Music('music.m4a');
music.play();
music.volume = 0.5;
music.fadeIn(2000); // Fade in music to 50% in 2 seconds

 

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