Commit graph

51 commits

Author SHA1 Message Date
photonstorm
d98b984ad2 SoundManager.volume now has its input value clamped to ensure it's between 0 and 1 (inclusive) 2015-05-05 11:04:14 +01:00
photonstorm
36c7084e01 Adjusting property order. 2015-05-05 10:59:54 +01:00
photonstorm
adad60f8f4 SoundManager.onVolumeChange is a new signal that is dispatched whenever the global volume changes. The new volume is passed as the only parameter to your callback.
SoundManager.onMute is a new signal that is dispatched when the SoundManager is globally muted, either directly via game code or as a result of the game pausing.

SoundManager.onUnMute is a new signal that is dispatched when the SoundManager is globally un-muted, either directly via game code or as a result of the game resuming from a pause.
2015-05-05 10:58:43 +01:00
photonstorm
e6ab4884a6 Set usingWebAudio if using it :) 2015-04-21 02:07:47 +01:00
photonstorm
8476a0b87f One ! too many #1746 2015-04-17 14:26:01 +01:00
photonstorm
59beae762d The SoundManager didn't accurately detect devices or browser environments with no sound card present and would try to carry on using a null Web Audio context (thanks @englercj #1746)
SoundManager.pauseAll, resumeAll and stopAll now checks if the SoundManager.noAudio is set and ignores the calls.

SoundManager.usingWebAudio is set to `false` by default (used to be `true`) and is only explicitly set if Web Audio is available and hasn't been disabled in the PhaserGlobal object.

SoundManager.touchLocked is now set to `false` should the device be using legacy Audio, avoiding the unlock call running without need.
2015-04-17 03:49:20 +01:00
photonstorm
a69e53f901 Copyright date change. 2015-02-25 03:36:23 +00:00
photonstorm
ba08498e73 Fixed bug with the watch list not checking decode status by key properly. 2015-02-20 00:58:05 +00:00
photonstorm
dfee82834d Sound.loop even when set for WebAudio wouldn't use the AudioContext loop property because Sound.start was being invoked with an offset and duration. Now if loop is true and no marker is being used it will use the native Web Audio loop support (#1431)
SoundManager.setDecodedCallback lets you specify a list of Sound files, or keys, and a callback. Once all of the Sound files have finished decoding the callback will be invoked. The amount of time spent decoding depends on the codec used and file size. If all of the files given have already decoded the callback is triggered immediately.

Sound.loopFull is a new method that will start playback of the Sound and set it to loop in its entirety.
2015-02-11 05:17:53 +00:00
photonstorm
65f8820514 SoundManager.unlock checks for audio start support and falls back to noteOn if not found. 2015-01-06 13:50:15 +00:00
photonstorm
40c490ce23 Phaser 2.2 Release Candidate 8 (newsletter build) 2014-11-17 14:14:50 +00:00
photonstorm
ff8a138081 jshint fix 2014-11-16 21:18:29 +00:00
photonstorm
5cd4225412 If you are reloading a Phaser Game on a page that never properly refreshes (such as in an AngularJS project) then you will quickly run out of AudioContext nodes. If this is the case create a global var called PhaserGlobal on the window object before creating the game. The active AudioContext will then be saved to window.PhaserGlobal.audioContext when the Phaser game is destroyed, and re-used when it starts again (#1233) 2014-11-16 21:05:31 +00:00
photonstorm
96fd0ade74 JSDoc fixes. 2014-10-21 22:43:42 +01:00
Richard Davey
01fd3df434 AudioSprite support is now built into the Loader and SoundManager. AudioSprites are like sprite sheets, only they consist of a selection of audio files and markers in a json configuration. You can find more details at https://github.com/tonistiigi/audiosprite (thanks @codevinsky #1205)
Fixed AudioSprite jsdoc, casing and formatting issues.
2014-09-23 22:15:09 +01:00
Jeremy Dowell
7cce1366f2 jshint cleanup 2014-09-23 10:25:49 -05:00
Jeremy Dowell
dd0d1729ad Phaser.AudioSprite
AudioSprite implementation for phaser.

Loads audio sprites based on the file format created with: https://github.com/tonistiigi/audiosprite
2014-09-23 10:21:29 -05:00
photonstorm
20551f9129 Lots of jsdocs fixes ready for the new doc generator. 2014-09-16 17:35:08 +01:00
photonstorm
26a55bd202 SoundManager.destroy is a new method that will destroy all current sounds and reset any callbacks.
StateManager.clearCurrentState now handles the process of clearing down the current state and is now called if the Game is destroyed.
Game.destroy now clears the current state, activating its shutdown callback if it had one. It also now destroys the SoundManager, stopping any currently running sounds (#1092)
2014-08-29 11:37:47 +01:00
photonstorm
eee1183a6a Forces use of a Canvas Renderer under CocoonJS automatically.
The SoundManager no longer requires a touch to unlock it, defaults to unlocked.
2014-05-29 23:17:18 +01:00
photonstorm
fd9d454bc6 Documentation updates. 2014-05-01 02:38:12 +01:00
photonstorm
add6b3966c jshint fix 2014-04-28 21:22:11 +01:00
photonstorm
a5cbd8f2a6 Fixed an issue where Sounds that had been paused via game code would un-mute if the game paused and resumed. 2014-04-28 20:30:47 +01:00
photonstorm
838027a93b Timer.timeCap is a new setting allowing your Timers to protect against unexpectedly large delta timers. 2014-04-28 13:22:29 +01:00
photonstorm
de17263472 jshint fix 2014-04-01 20:57:52 +01:00
photonstorm
4d06298e64 Fixed silly SoundManager bug :) 2014-04-01 19:51:48 +01:00
photonstorm
03b80887f2 SoundManager.removeByKey(key) will remove all sounds from the SoundManager that have a key matching the given value. 2014-04-01 03:42:30 +01:00
photonstorm
3728f25d68 SoundManager.remove(sound) now lets you remove a sound from the SoundManager, destroying it in the process.
Sound.destroy will remove a sound and all local references it holds, optionally removing itself from the SoundManager as well.
2014-04-01 03:38:13 +01:00
photonstorm
3f8911d95f SoundManager.boot will check to see if the AudioContext was created before carrying on (thanks @keyle, fix #669) 2014-03-31 11:22:44 +01:00
Christian Wesselhoeft
61f18b675c Trim trailing whitespace. 2014-03-25 14:56:04 -07:00
photonstorm
d0fa50f014 Fixed issue stopping SoundManager.volume from working correctly on a global volume basis (fix # 488) 2014-02-26 14:40:55 +00:00
photonstorm
cc06a62b90 Pausing the game will now mute audio and resuming will un-mute, unless it was muted via the game (fixes #439) 2014-02-25 03:12:12 +00:00
photonstorm
ea4873e286 SoundManager.play() does not do anything with destroyOnComplete (fix #333) 2014-02-21 23:55:11 +00:00
photonstorm
0896c2fac7 Updating copyright year and README. 2014-02-05 16:54:59 +00:00
photonstorm
ce4cf531d4 Added class constructors, fixed Stripshader, added relative Tween example and updated Tween source. 2013-12-30 16:54:00 +00:00
photonstorm
a361a18616 Updated IE11 check, forces IE11 to use Canvas renderer even in AUTO mode. 2013-12-13 14:04:14 +00:00
photonstorm
141337bed9 Heavily optimised PixiShader. 2013-11-26 05:13:56 +00:00
photonstorm
299115ca5d The entire Phaser library has been updated to match the new JSHint configuration. 2013-11-25 04:40:04 +00:00
photonstorm
13a2cc2feb Updating all files to adhere to the JSHint settings and fixing lots of documentation errors on the way. 2013-11-25 03:13:04 +00:00
photonstorm
155c863d69 New Timer class and scale event updates. 2013-11-24 11:04:58 +00:00
photonstorm
e620c99479 ShaderToy convertor up and working, lots of shaders being turned into Pixi filters :) 2013-11-20 02:28:28 +00:00
Richard Davey
f832bacfd6 More Docs! 2013-10-03 01:21:08 +01:00
Richard Davey
ca113b85aa More docs coming on. 2013-10-01 16:39:39 +01:00
Richard Davey
305b12d76b Adding docs. 2013-10-01 15:01:46 +01:00
Richard Davey
31bbf05ace * Fixed small bug stopping Tween.pause / resume from resuming correctly when called directly.
* Fixed an issue where Tweens.removeAll wasn't clearing tweens in the addition queue.
* Change: When you swap State all active tweens are now purged.
2013-09-30 11:15:50 +01:00
Webeled
26a595cd44 JSDocs update ;) 2013-09-19 16:34:48 +02:00
Webeled
bb9761aaf4 It loops but still problems on the constructor 2013-09-16 17:40:56 +02:00
Richard Davey
f260108433 Tidying up source code for release. Also refactored World to use a Group instance, rather tha duplicate functions. 2013-09-11 13:21:07 +01:00
Richard Davey
e41e35fd09 Fixed an error that stopped 2 tweens from being able to run on the same object. Also refactored a lot of the classes to remove prototype properties and move them to local instance properties. 2013-09-10 20:40:34 +01:00
Richard Davey
a486bf6b4a Phaser now running on iOS. Also fixed a legacy bug where a pending sound wouldn't play once it was touch unlocked. Also fixed Input not working on WebGL contexts. Added WebGL texture updates to the Group/World swap functions. 2013-09-10 16:46:39 +01:00