Commit graph

817 commits

Author SHA1 Message Date
samme
51ecad61ad Clamp volume
Fixes 'IndexSizeError: The index is not in the allowed range'
2020-03-24 17:00:25 -07:00
samme
cae9d2ec07 Description for BaseSoundManager#playAudioSprite 2020-03-24 13:56:22 -07:00
Chris Andrew
8655dfa6c9
WebAudioSoundManager description spacing 2020-03-17 21:22:40 +00:00
Chris Andrew
3fb803568d
HTML5AudioSoundManager description spacing 2020-03-17 21:21:13 +00:00
samme
677cfae424 Docs for Sound Managers 2020-02-20 09:10:25 -08:00
Richard Davey
ff65e69cd1 Changed copyright date to 2020 2020-01-15 12:07:09 +00:00
Richard Davey
3d144bd99e JSDoc update. Fix #4955 2020-01-15 10:29:09 +00:00
samme
974ffd93ee Docs for Phaser.Sound.BaseSoundManager#play
Always adds a new sound
2020-01-03 13:44:07 -08:00
samme
56cd59c537 Throw error for a bad audio asset key 2019-12-23 09:46:45 -08:00
Richard Davey
5e1d86b75b WebAudioSoundManager.setAudioContext is a new method that allows you to set the Sound Manager Audio Context to a different context instance. It will also disconnect and re-create the gain nodes on the new context. 2019-11-20 14:50:28 +00:00
Richard Davey
77ca0d0bbd The WebAudioSoundManager.unlock method will now listen for keydown events in order to unlock the Audio Context, as well as touch and pointer events, making it more accessible 2019-11-20 13:50:55 +00:00
Richard Davey
620ce8556f Update GLOBAL_MUTE_EVENT.js 2019-10-10 23:50:55 +01:00
Richard Davey
59cdc1fef0 Update WebAudioSoundManager.js 2019-10-04 13:14:11 +01:00
Richard Davey
7063085120 Updated jsdocs. Fix #4200 2019-10-02 13:21:51 +01:00
Richard Davey
89c30fe42f BaseSoundManager.forEachActiveSound will now only invoke the callback if the sound actually exists and isn't pending removal. Fix #3383 2019-10-02 12:50:10 +01:00
Richard Davey
5dbfbae5f9 Updated jsdoc types. Fix #4308 2019-10-01 17:04:06 +01:00
Richard Davey
2829d27e8a Fixed return type. Fix #4772 2019-09-30 13:32:14 +01:00
Richard Davey
e710bec68b The WebAudioSoundManager will now remove the document touch handlers even if the Promise fails, preventing it from throwing a rejection handler error. 2019-07-17 14:35:10 +01:00
Richard Davey
dfdba323fb New decodeAudio method for decoding base64 audio into webaudio 2019-06-11 14:31:43 +01:00
Richard Davey
a124580930 New Audio Decode type 2019-06-11 14:31:17 +01:00
Richard Davey
f2c2c93499 Added new DECODE and DECODE_ALL events 2019-06-11 14:29:29 +01:00
Richard Davey
c91ed91ce3 License link update 2019-05-10 16:15:04 +01:00
Richard Davey
a6341a97a8 Fixed Types references 2019-05-09 15:32:53 +01:00
Richard Davey
dc18d06f10 Sound Types 2019-05-09 12:38:12 +01:00
Richard Davey
0db663d901 More typedefs 2019-02-13 15:38:50 +00:00
Richard Davey
ccaae460a4 Added jsdoc version numbers to each event 2019-02-12 11:37:58 +00:00
Richard Davey
ba381f8e3d Don't create a promise unless the context exists 2019-02-04 23:29:39 +00:00
Richard Davey
eb9ed3463f Lots of namespace and jsdoc fixes 2019-02-01 18:02:58 +00:00
Richard Davey
1eccff1e3b Fixed jsdoc links and markdown bullet lists 2019-01-18 15:20:56 +00:00
Richard Davey
44cff816ba Added all the Sound Events. 2019-01-17 17:20:54 +00:00
Richard Davey
aa341854c7 Happy New Year 2019-01-15 16:20:22 +00:00
Richard Davey
10878f9c7b Formatting fix 2018-11-20 10:33:07 +00:00
Richard Davey
f0039678f9
Merge pull request #4151 from Waclaw-I/HTML5AudioSound-fixes
Setting HTML5AudioSound's volume and mute is now working.
2018-11-20 10:28:09 +00:00
Richard Davey
476a31093a onFocus and onBlur ignore if locked 2018-11-13 19:47:47 +00:00
Piotr 'Waclaw I' Hanusiak
361708a22b Setting HTML5AudioSound's volume and mute is now working. 2018-11-07 19:08:48 +01:00
Richard Davey
4b1c762296 Updated @memberOf to @memberof 2018-10-10 10:49:13 +01:00
Richard Davey
a9063604dc Replace @readOnly with @readonly 2018-10-09 13:40:00 +01:00
Chris Andrew
5f3767f43d Polished some DataManagerPlugin and EachActiveSoundCallback descriptions. 2018-05-23 08:18:49 +01:00
Chris Andrew
f95b35eae7 Finished off descriptions for Data, Plugins and Sound. 2018-05-23 08:09:24 +01:00
Richard Davey
d595da49fd Now use the prestep event to update instead 2018-05-11 01:50:02 +01:00
Richard Davey
39cf7252c9 Check if body exists. Fix #3649. 2018-05-09 13:45:47 +01:00
Richard Davey
ec3bd4c729 The WebAudioSoundManager will now listen for 'click' events on the document body, as well as touch events, before resuming the AudioContext. 2018-05-08 16:51:43 +01:00
Richard Davey
1afb066dfa Docs 2018-05-04 11:33:56 +01:00
Richard Davey
a09c8576d5 Shorter error 2018-05-04 02:38:09 +01:00
Richard Davey
d780cda233 Audio Sprites now support loop property 2018-05-04 02:38:01 +01:00
Richard Davey
669792d3ce Tidying up 2018-05-03 17:12:19 +01:00
Pavle Goloskokovic
116e62fafe Setting locked lag only if there are locked audio tags 2018-04-21 20:09:18 +02:00
Pavle Goloskokovic
eec19e146a Removing locked actions from queue before performing it 2018-04-21 20:08:25 +02:00
Pavle Goloskokovic
923ac40d65 No need for resetting lockedActionsQueue 2018-04-21 20:06:14 +02:00
Pavle Goloskokovic
53b69f036c Removed assigning lockedActionsQueue to empty array since it is initialized in constructor 2018-04-21 20:02:48 +02:00
Pavle Goloskokovic
f89a11793f Initializing lockedActionsQueue in constructor 2018-04-21 19:58:52 +02:00
Richard Davey
6626fae27d eslint fix 2018-04-20 14:03:06 +01:00
Richard Davey
1185586b23 Web Audio context.close now picks up the Promise. 2018-04-20 14:01:57 +01:00
Richard Davey
18585de81d Lots of jsdoc fixes 2018-04-16 14:43:24 +01:00
Pavle Goloskokovic
ee5c56cdc3 Instantiating lockedActionsQueue only when used 2018-04-14 18:56:36 +02:00
Pavle Goloskokovic
44a377f83c Using tag data for checking if the sound is locked instead of global flag 2018-04-14 18:55:52 +02:00
Pavle Goloskokovic
e86e09a6b3 In an edge case if a marker has duration set to 0 (weird :P) we don't want to update sound duration 2018-04-14 18:55:02 +02:00
Pavle Goloskokovic
920e083a8a Updating sound duration only if it is not set yet (equal to 0) 2018-04-14 18:54:01 +02:00
Pavle Goloskokovic
d664a7d4a6 Marking all locked audio tags as unlocked after loading finishes 2018-04-14 18:52:43 +02:00
Pavle Goloskokovic
5efa219adc Removed redundant condition 2018-04-14 18:51:21 +02:00
Pavle Goloskokovic
2167654009 Skipping unlocking logic if there are no locked tags 2018-04-14 18:50:28 +02:00
Pavle Goloskokovic
9125f559c2 Collecting only locked audio tags for unlocking 2018-04-14 18:47:39 +02:00
Pavle Goloskokovic
43e3dc424e Renamed allTags to lockedTags 2018-04-14 18:00:23 +02:00
Pavle Goloskokovic
04c842f749 Checking if audio is locked each time unlock method is called and skipping it in case it is not 2018-04-14 17:51:31 +02:00
Pavle Goloskokovic
c2d661f600 Unlocking Web Audio sound manager immediately in its constructor 2018-04-14 17:48:55 +02:00
Pavle Goloskokovic
403f5b3e33 Not unlocking sound manager by default in base class 2018-04-14 17:48:16 +02:00
Richard Davey
c8bbea552d Fixed issue in HTMLAudioSound where mute would get into a recursive loop. 2018-04-13 12:53:03 +01:00
Hua
cd42ce981a Add destroy event of sound object
Add destroy event of sound object
2018-04-11 16:29:29 +08:00
Richard Davey
5c89c9900c BaseSound.config now contains all defaults. Fix #3525 2018-04-09 14:09:04 +01:00
Richard Davey
d1788d8a4c Updated jsdocs 2018-04-07 15:58:08 +01:00
Richard Davey
f5373b2dee jsdoc fixes 2018-03-29 13:23:44 +01:00
Richard Davey
747f09af86 jsdoc fixes 2018-03-28 15:04:09 +01:00
Richard Davey
2868b8b588 Added new chainable methods: setRate, setMute, setVolume, setSeek, setDune 2018-03-28 14:14:07 +01:00
Richard Davey
cfab72aef4 Tidying up formatting 2018-03-28 14:13:40 +01:00
Richard Davey
ff9dfc1f9d Fixed event names 2018-03-28 14:13:30 +01:00
Richard Davey
a76b9a1827 BaseSoundManager.rate and BaseSoundManager.detune would incorrectly called setRate on its sounds, instead of calculateRate. 2018-03-28 14:12:37 +01:00
Richard Davey
dcbc81e6b2 Remove un-used properties and setters 2018-03-28 14:12:16 +01:00
Richard Davey
d78a9d097f eslint fixes 2018-03-22 13:22:23 +00:00
Richard Davey
c0ec42dc2b Added setRate, setDetune and renamed setRate to calculateRate 2018-03-21 16:43:08 +00:00
Richard Davey
0ef92e1172 Merge branch 'pr/3439' 2018-03-21 16:06:56 +00:00
Richard Davey
eb10a0121a Added new methods to NoAudio 2018-03-21 14:56:08 +00:00
Richard Davey
2433844cd3 Added setVolume and setMute 2018-03-21 14:54:23 +00:00
Richard Davey
645c03f2e9 Added setRate and setDetune methods 2018-03-21 14:40:07 +00:00
orblazer
90cf919b10 Fix "object" types on Sound and Time 2018-03-21 15:02:10 +01:00
orblazer
e60d573912 Fix "object" types in Actions 2018-03-20 23:36:41 +01:00
orblazer
9375bb0530 Fix multiple types on Tilemaps 2018-03-20 16:11:33 +01:00
orblazer
4cff464555 Fix nullable types 2018-03-20 15:36:03 +01:00
orblazer
fa13b597e3 Add more callbacks 2018-03-19 23:08:05 +01:00
Richard Davey
3eef3213be Spacing 2018-03-19 16:34:39 +00:00
Richard Davey
05a4385cd7 jsdoc fixes 2018-03-16 17:29:39 +00:00
Richard Davey
acf88f5aa5
Merge pull request #3313 from samme/feature/playCatchPromise
Warn if HTML5AudioSound#audio fails to play
2018-03-05 21:58:16 +00:00
Richard Davey
23285896c0 The HTML5 Sound Manager would unlock the Sound API on a touch event but only if the audio files were loaded in the first Scene, if they were loaded in a subsequent Scene the audio system would never unlock. It now unlocks only if there are audio files in the cache. Fix #3311 2018-03-05 13:39:08 +00:00
samme
983772a2fa Warn if HTML5AudioSound#audio fails to play
#3309
2018-03-03 14:29:14 -08:00
Pavle Goloskokovic
e0b85dd3f2 Updated forEachActiveSound method docs to make scope param optional 2018-02-23 15:27:40 +01:00
Richard Davey
df341be520 Removed local properties that were overwritten by the getters / setters 2018-02-22 01:26:36 +00:00
Richard Davey
fe5bd7e6bb Fixed jsdoc errors 2018-02-21 22:51:05 +00:00
Pavle Goloskokovic
b39f4fcfa1 Fixes #3238 2018-02-19 16:17:06 +01:00
Pavle Goloskokovic
fe9951216b Calling base class destroy method only after cleaning up all Web Audio related stuff 2018-02-18 21:52:51 +01:00
Pavle Goloskokovic
ae89750610 Removed redundant docs 2018-02-18 21:38:04 +01:00
Pavle Goloskokovic
812cbbff9f Removed redundant docs 2018-02-18 21:37:23 +01:00
Pavle Goloskokovic
7b9af8691a Fixed add method docs 2018-02-18 21:36:39 +01:00
Pavle Goloskokovic
c3313ef6e5 Fixed class docs 2018-02-18 21:35:39 +01:00
Pavle Goloskokovic
631e6cdf59 Removed redundant docs 2018-02-18 21:24:49 +01:00
Pavle Goloskokovic
1046991e66 Removed redundant docs 2018-02-18 21:24:29 +01:00
Pavle Goloskokovic
81bebfd8c1 Removed redundant docs 2018-02-18 21:24:05 +01:00
Pavle Goloskokovic
ae890eca8a Removed redundant docs 2018-02-18 21:23:30 +01:00
Pavle Goloskokovic
94859c6f99 Removed redundant docs 2018-02-18 21:23:15 +01:00
Pavle Goloskokovic
0b377a34d6 Fixed update method docs, ESLint fix 2018-02-18 21:22:49 +01:00
Pavle Goloskokovic
a08dc5ef64 ESLint fix for playCatchPromise method 2018-02-18 21:21:42 +01:00
Pavle Goloskokovic
1e08945173 Fixed pickAudioTag method docs 2018-02-18 21:20:49 +01:00
Pavle Goloskokovic
c745e096ad Fixed pickAndPlayAudioTag method docs 2018-02-18 21:20:21 +01:00
Pavle Goloskokovic
b607251e77 Fixed stop method docs 2018-02-18 21:20:00 +01:00
Pavle Goloskokovic
5010755aea Fixed resume method docs 2018-02-18 21:19:44 +01:00
Pavle Goloskokovic
7fd6ce95c3 Fixed pause method docs 2018-02-18 21:19:16 +01:00
Pavle Goloskokovic
ebd23f9ae2 Fixed play method docs 2018-02-18 21:18:45 +01:00
Pavle Goloskokovic
0d20a413a7 Fixed class docs 2018-02-18 21:18:09 +01:00
Pavle Goloskokovic
735394bc84 ESLint fix 2018-02-18 21:13:55 +01:00
Pavle Goloskokovic
e6616ec484 Fixed play method docs 2018-02-18 21:13:18 +01:00
Pavle Goloskokovic
1d373cb91e ESLint fix 2018-02-18 21:12:34 +01:00
Pavle Goloskokovic
afbbd7a724 ESLint fix 2018-02-18 21:11:56 +01:00
Pavle Goloskokovic
9af39924ca Updated sounds property docs, ESLint fix 2018-02-18 21:10:37 +01:00
Pavle Goloskokovic
e9ef90da40 ESLint fix 2018-02-18 21:09:14 +01:00
Pavle Goloskokovic
fcad5b12d2 Removed redundant docs 2018-02-18 20:38:57 +01:00
Pavle Goloskokovic
41cf6a2584 Removed redundant docs 2018-02-18 20:38:38 +01:00
Pavle Goloskokovic
ec51794197 Removed redundant docs 2018-02-18 20:38:04 +01:00
Pavle Goloskokovic
4969349f23 Removed redundant docs 2018-02-18 20:37:53 +01:00
Pavle Goloskokovic
ae2120b36a Removed redundant docs, eslint fix 2018-02-18 20:37:37 +01:00
Pavle Goloskokovic
dd9d769061 Removed redundant docs, eslint fix 2018-02-18 20:37:27 +01:00
Pavle Goloskokovic
2ec0f4f5c5 Removed redundant docs 2018-02-18 20:37:12 +01:00
Pavle Goloskokovic
c140e2e40b Removed redundant docs 2018-02-18 20:36:59 +01:00
Pavle Goloskokovic
06d8a21d3a Removed redundant docs 2018-02-18 20:36:16 +01:00
Pavle Goloskokovic
4dbb8a1dee Removed redundant docs 2018-02-18 20:36:04 +01:00
Pavle Goloskokovic
c5981812e2 Removed redundant docs 2018-02-18 20:35:53 +01:00
Pavle Goloskokovic
19bec4d832 Removed redundant docs 2018-02-18 20:35:35 +01:00
Pavle Goloskokovic
8850435ed3 Removed redundant docs 2018-02-18 20:35:14 +01:00
Pavle Goloskokovic
03a659a9e2 Removed redundant docs 2018-02-18 20:35:02 +01:00
Pavle Goloskokovic
e676d264fa Removed redundant docs 2018-02-18 20:34:49 +01:00
Pavle Goloskokovic
0f6aa55859 Removed redundant docs 2018-02-18 20:34:37 +01:00
Pavle Goloskokovic
67fd912c1f Fixed class docs 2018-02-18 20:34:16 +01:00
Pavle Goloskokovic
d7f25fb363 Removed redundant docs 2018-02-18 20:25:22 +01:00
Pavle Goloskokovic
b92f958a4f Removed redundant docs 2018-02-18 20:25:00 +01:00
Pavle Goloskokovic
4efd588123 Removed redundant docs 2018-02-18 20:24:44 +01:00
Pavle Goloskokovic
5c631d8b8e Removed redundant docs 2018-02-18 20:24:31 +01:00
Pavle Goloskokovic
a733ce8054 Removed redundant docs, eslint fix 2018-02-18 20:24:18 +01:00
Pavle Goloskokovic
8cf45cdc7e Removed redundant docs, eslint fix 2018-02-18 20:24:05 +01:00
Pavle Goloskokovic
06fba3b6c7 Removed redundant docs, eslint fix 2018-02-18 20:23:55 +01:00
Pavle Goloskokovic
3bcf936347 Fixed play method docs, eslint fix 2018-02-18 20:23:31 +01:00
Pavle Goloskokovic
7522e8613f Removed redundant docs 2018-02-18 20:23:15 +01:00
Pavle Goloskokovic
8945fa798e Fixed play method docs 2018-02-18 20:23:02 +01:00
Pavle Goloskokovic
43eec1c43c Removed redundant docs 2018-02-18 20:22:52 +01:00