mirror of
https://github.com/photonstorm/phaser
synced 2024-12-21 10:33:35 +00:00
1 line
9.2 KiB
JSON
1 line
9.2 KiB
JSON
|
{"class":{"name":"Phaser.SoundManager","extends":"","static":false,"constructor":true,"parameters":[{"name":"game","type":["Phaser.Game"],"help":" reference to the current game instance.","optional":false,"default":null}],"help":"The Sound Manager is responsible for playing back audio via either the Legacy HTML Audio tag or via Web Audio if the browser supports it.\\nNote: On Firefox 25+ on Linux if you have media.gstreamer disabled in about:config then it cannot play back mp3 or m4a files.\\nThe audio file type and the encoding of those files are extremely important. Not all browsers can play all audio formats.\\nThere is a good guide to what's supported here: http:\/\/hpr.dogphilosophy.net\/test\/"},"consts":[],"methods":{"public":[{"name":"add","static":false,"returns":{"types":["Phaser.Sound"],"help":"The new sound instance."},"help":"Adds a new Sound into the SoundManager.","line":355,"public":true,"protected":false,"private":false,"parameters":[{"name":"key","type":["string"],"help":"Asset key for the sound.","optional":false,"default":null},{"name":"volume","type":["number"],"help":"Default value for the volume.","optional":true,"default":"1"},{"name":"loop","type":["boolean"],"help":"Whether or not the sound will loop.","optional":true,"default":"false"},{"name":"connect","type":["boolean"],"help":"Controls if the created Sound object will connect to the master gainNode of the SoundManager when running under WebAudio.","optional":true,"default":"true"}],"inherited":false,"inheritedFrom":""},{"name":"addSprite","static":false,"returns":{"types":["Phaser.AudioSprite"],"help":"The new AudioSprite instance."},"help":"Adds a new AudioSprite into the SoundManager.","line":376,"public":true,"protected":false,"private":false,"parameters":[{"name":"key","type":["string"],"help":"Asset key for the sound.","optional":false,"default":null}],"inherited":false,"inheritedFrom":""},{"name":"decode","static":false,"returns":null,"help":"Decode a sound by its assets key.","line":291,"public":true,"protected":false,"private":false,"parameters":[{"name":"key","type":["string"],"help":"Assets key of the sound to be decoded.","optional":false,"default":null},{"name":"sound","type":["Phaser.Sound"],"help":"Its buffer will be set to decoded data.","optional":true,"default":null}],"inherited":false,"inheritedFrom":""},{"name":"destroy","static":false,"returns":null,"help":"Stops all the sounds in the game, then destroys them and finally clears up any callbacks.","line":523,"public":true,"protected":false,"private":false,"parameters":[],"inherited":false,"inheritedFrom":""},{"name":"pauseAll","static":false,"returns":null,"help":"Pauses all the sounds in the game.","line":255,"public":true,"protected":false,"private":false,"parameters":[],"inherited":false,"inheritedFrom":""},{"name":"play","static":false,"returns":{"types":["Phaser.Sound"],"help":"The new sound instance."},"help":"Adds a new Sound into the SoundManager and starts it playing.","line":445,"public":true,"protected":false,"private":false,"parameters":[{"name":"key","type":["string"],"help":"Asset key for the sound.","optional":false,"default":null},{"name":"volume","type":["number"],"help":"Default value for the volume.","optional":true,"default":"1"},{"name":"loop","type":["boolean"],"help":"Whether or not the sound will loop.","optional":true,"default":"false"}],"inherited":false,"inheritedFrom":""},{"name":"remove","static":false,"returns":{"types":["boolean"],"help":"True if the sound was removed successfully, otherwise false."},"help":"Removes a Sound from the SoundManager. The removed Sound is destroyed before removal.","line":391,"public":true,"protected":false,"private":false,"parameters":[{"name":"sound","type":["Phaser.Sound"],"help":"The sound object to remove.","optional":false,"default":null}],"inherited":false,"inheritedFrom":""},{"name":"removeByKey","static":false,"returns":{"types":["number"],"help":"The number of matching sound objects that were removed."},"help":"Removes all Sounds from the SoundManager that have an asset key matching the given value.\\nT
|