Coder Social home page Coder Social logo

Comments (2)

HackManiac avatar HackManiac commented on May 16, 2024

I ran into the same issue today and digged a bit deeper on this, although Rich already wrote in http://www.html5gamedevs.com/topic/445-sounds-in-phaser/#entry1993 that he is working on a rewrite of the SoundManager.

If you play a sound for the first time, it's loaded, but not yet decoded. So the SoundManager.prototype.play method will call SoundManager.prototype.decode, which then will perform two calls to Sound.prototype.play in short intervals:

  1. after decoding there is a call to Sound.prototype.setDecodedBuffer, which in turn calls the Sound.prototype.play function (with the correct volume configured).

  2. after step 1 the callback of SoundManager.prototype.decode is called which then calls SoundManager.prototype.play. Since only the key is given as an argument, the play function assumes a volume of 1.0.

I created a pull request for a possible interim solution until the new SoundManager is in place.

from phaser.

photonstorm avatar photonstorm commented on May 16, 2024

This is now in 0.9.5, will do well until new sound manager goes in.

from phaser.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.