Skip to content

Commit 33253a7

Browse files
committed
Fixed version numbers and JSDocs. phaserjs#5274
1 parent dde5b25 commit 33253a7

4 files changed

Lines changed: 41 additions & 45 deletions

File tree

src/sound/events/PAN_EVENT.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
* ```
2020
*
2121
* @event Phaser.Sound.Events#PAN
22-
* @since 3.0.0
22+
* @since 3.50.0
2323
*
2424
* @param {(Phaser.Sound.WebAudioSound|Phaser.Sound.HTML5AudioSound)} sound - A reference to the Sound that emitted the event.
2525
* @param {number} pan - The new pan of the Sound.

src/sound/html5/HTML5AudioSound.js

Lines changed: 20 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -451,10 +451,8 @@ var HTML5AudioSound = new Class({
451451
* @since 3.0.0
452452
*
453453
* @param {number} time - The current timestamp as generated by the Request Animation Frame or SetTimeout.
454-
* @param {number} delta - The delta time elapsed since the last frame.
455454
*/
456-
// eslint-disable-next-line no-unused-vars
457-
update: function (time, delta)
455+
update: function (time)
458456
{
459457
if (!this.isPlaying)
460458
{
@@ -581,7 +579,7 @@ var HTML5AudioSound = new Class({
581579
/**
582580
* Boolean indicating whether the sound is muted or not.
583581
* Gets or sets the muted state of this sound.
584-
*
582+
*
585583
* @name Phaser.Sound.HTML5AudioSound#mute
586584
* @type {boolean}
587585
* @default false
@@ -619,7 +617,7 @@ var HTML5AudioSound = new Class({
619617
*
620618
* @param {boolean} value - `true` to mute this sound, `false` to unmute it.
621619
*
622-
* @return {Phaser.Sound.HTML5AudioSound} This Sound instance.
620+
* @return {this} This Sound instance.
623621
*/
624622
setMute: function (value)
625623
{
@@ -630,7 +628,7 @@ var HTML5AudioSound = new Class({
630628

631629
/**
632630
* Gets or sets the volume of this sound, a value between 0 (silence) and 1 (full volume).
633-
*
631+
*
634632
* @name Phaser.Sound.HTML5AudioSound#volume
635633
* @type {number}
636634
* @default 1
@@ -668,7 +666,7 @@ var HTML5AudioSound = new Class({
668666
*
669667
* @param {number} value - The volume of the sound.
670668
*
671-
* @return {Phaser.Sound.HTML5AudioSound} This Sound instance.
669+
* @return {this} This Sound instance.
672670
*/
673671
setVolume: function (value)
674672
{
@@ -715,7 +713,7 @@ var HTML5AudioSound = new Class({
715713

716714
/**
717715
* Sets the playback rate of this Sound.
718-
*
716+
*
719717
* For example, a value of 1.0 plays the audio at full speed, 0.5 plays the audio at half speed
720718
* and 2.0 doubles the audios playback speed.
721719
*
@@ -725,7 +723,7 @@ var HTML5AudioSound = new Class({
725723
*
726724
* @param {number} value - The playback rate at of this Sound.
727725
*
728-
* @return {Phaser.Sound.HTML5AudioSound} This Sound.
726+
* @return {this} This Sound instance.
729727
*/
730728
setRate: function (value)
731729
{
@@ -779,7 +777,7 @@ var HTML5AudioSound = new Class({
779777
*
780778
* @param {number} value - The range of the value is -1200 to 1200, but we recommend setting it to [50](https://en.wikipedia.org/wiki/50_Cent).
781779
*
782-
* @return {Phaser.Sound.HTML5AudioSound} This Sound.
780+
* @return {this} This Sound instance.
783781
*/
784782
setDetune: function (value)
785783
{
@@ -793,7 +791,7 @@ var HTML5AudioSound = new Class({
793791
* Setting it to a specific value moves current playback to that position.
794792
* The value given is clamped to the range 0 to current marker duration.
795793
* Setting seek of a stopped sound has no effect.
796-
*
794+
*
797795
* @name Phaser.Sound.HTML5AudioSound#seek
798796
* @type {number}
799797
* @fires Phaser.Sound.Events#SEEK
@@ -857,7 +855,7 @@ var HTML5AudioSound = new Class({
857855
*
858856
* @param {number} value - The point in the sound to seek to.
859857
*
860-
* @return {Phaser.Sound.HTML5AudioSound} This Sound instance.
858+
* @return {this} This Sound instance.
861859
*/
862860
setSeek: function (value)
863861
{
@@ -868,7 +866,7 @@ var HTML5AudioSound = new Class({
868866

869867
/**
870868
* Flag indicating whether or not the sound or current sound marker will loop.
871-
*
869+
*
872870
* @name Phaser.Sound.HTML5AudioSound#loop
873871
* @type {boolean}
874872
* @default false
@@ -921,13 +919,14 @@ var HTML5AudioSound = new Class({
921919

922920
/**
923921
* Gets or sets the pan of this sound, a value between -1 (full left pan) and 1 (full right pan).
924-
* Has no effect on HTML5 Audio Sound.
922+
*
923+
* Has no audible effect on HTML5 Audio Sound, but still generates the PAN Event.
925924
*
926925
* @name Phaser.Sound.HTML5AudioSound#pan
927926
* @type {number}
928927
* @default 0
929928
* @fires Phaser.Sound.Events#PAN
930-
* @since 3.0.0
929+
* @since 3.50.0
931930
*/
932931
pan: {
933932

@@ -945,15 +944,17 @@ var HTML5AudioSound = new Class({
945944
},
946945

947946
/**
948-
* Sets the pan of this Sound. Has no effect on HTML5 Audio Sound.
947+
* Sets the pan of this sound, a value between -1 (full left pan) and 1 (full right pan).
948+
*
949+
* Has no audible effect on HTML5 Audio Sound, but still generates the PAN Event.
949950
*
950951
* @method Phaser.Sound.HTML5AudioSound#setPan
951952
* @fires Phaser.Sound.Events#PAN
952-
* @since 3.4.0
953+
* @since 3.50.0
953954
*
954-
* @param {number} value - The pan of the sound.
955+
* @param {number} value - The pan of the sound. A value between -1 (full left pan) and 1 (full right pan).
955956
*
956-
* @return {Phaser.Sound.HTML5AudioSound} This Sound instance.
957+
* @return {this} This Sound instance.
957958
*/
958959
setPan: function (value)
959960
{

src/sound/noaudio/NoAudioSound.js

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,6 @@ var NoAudioSound = new Class({
9595
*
9696
* @return {boolean} false
9797
*/
98-
// eslint-disable-next-line no-unused-vars
9998
addMarker: returnFalse,
10099

101100
/**
@@ -106,7 +105,6 @@ var NoAudioSound = new Class({
106105
*
107106
* @return {boolean} false
108107
*/
109-
// eslint-disable-next-line no-unused-vars
110108
updateMarker: returnFalse,
111109

112110
/**

src/sound/webaudio/WebAudioSound.js

Lines changed: 20 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ var WebAudioSound = new Class({
4545

4646
if (!this.audioBuffer)
4747
{
48-
throw new Error('There is no audio asset with key "' + key + '" in the audio cache');
48+
throw new Error('Audio key "' + key + '" missing from cache');
4949
}
5050

5151
/**
@@ -97,6 +97,7 @@ var WebAudioSound = new Class({
9797
* @name Phaser.Sound.WebAudioSound#pannerNode
9898
* @type {StereoPannerNode}
9999
* @private
100+
* @since 3.50.0
100101
*/
101102
this.pannerNode = manager.context.createStereoPanner();
102103

@@ -187,7 +188,7 @@ var WebAudioSound = new Class({
187188

188189
/**
189190
* Play this sound, or a marked section of it.
190-
*
191+
*
191192
* It always plays the sound from the start. If you want to start playback from a specific time
192193
* you can set 'seek' setting of the config object, provided to this call, to that value.
193194
*
@@ -451,12 +452,8 @@ var WebAudioSound = new Class({
451452
* @fires Phaser.Sound.Events#LOOPED
452453
* @protected
453454
* @since 3.0.0
454-
*
455-
* @param {number} time - The current timestamp as generated by the Request Animation Frame or SetTimeout.
456-
* @param {number} delta - The delta time elapsed since the last frame.
457455
*/
458-
// eslint-disable-next-line no-unused-vars
459-
update: function (time, delta)
456+
update: function ()
460457
{
461458
if (this.hasEnded)
462459
{
@@ -626,7 +623,7 @@ var WebAudioSound = new Class({
626623

627624
/**
628625
* Sets the playback rate of this Sound.
629-
*
626+
*
630627
* For example, a value of 1.0 plays the audio at full speed, 0.5 plays the audio at half speed
631628
* and 2.0 doubles the audios playback speed.
632629
*
@@ -636,7 +633,7 @@ var WebAudioSound = new Class({
636633
*
637634
* @param {number} value - The playback rate at of this Sound.
638635
*
639-
* @return {Phaser.Sound.WebAudioSound} This Sound.
636+
* @return {this} This Sound instance.
640637
*/
641638
setRate: function (value)
642639
{
@@ -683,7 +680,7 @@ var WebAudioSound = new Class({
683680
*
684681
* @param {number} value - The range of the value is -1200 to 1200, but we recommend setting it to [50](https://en.wikipedia.org/wiki/50_Cent).
685682
*
686-
* @return {Phaser.Sound.WebAudioSound} This Sound.
683+
* @return {this} This Sound instance.
687684
*/
688685
setDetune: function (value)
689686
{
@@ -695,7 +692,7 @@ var WebAudioSound = new Class({
695692
/**
696693
* Boolean indicating whether the sound is muted or not.
697694
* Gets or sets the muted state of this sound.
698-
*
695+
*
699696
* @name Phaser.Sound.WebAudioSound#mute
700697
* @type {boolean}
701698
* @default false
@@ -728,7 +725,7 @@ var WebAudioSound = new Class({
728725
*
729726
* @param {boolean} value - `true` to mute this sound, `false` to unmute it.
730727
*
731-
* @return {Phaser.Sound.WebAudioSound} This Sound instance.
728+
* @return {this} This Sound instance.
732729
*/
733730
setMute: function (value)
734731
{
@@ -739,7 +736,7 @@ var WebAudioSound = new Class({
739736

740737
/**
741738
* Gets or sets the volume of this sound, a value between 0 (silence) and 1 (full volume).
742-
*
739+
*
743740
* @name Phaser.Sound.WebAudioSound#volume
744741
* @type {number}
745742
* @default 1
@@ -771,7 +768,7 @@ var WebAudioSound = new Class({
771768
*
772769
* @param {number} value - The volume of the sound.
773770
*
774-
* @return {Phaser.Sound.WebAudioSound} This Sound instance.
771+
* @return {this} This Sound instance.
775772
*/
776773
setVolume: function (value)
777774
{
@@ -785,7 +782,7 @@ var WebAudioSound = new Class({
785782
* Setting it to a specific value moves current playback to that position.
786783
* The value given is clamped to the range 0 to current marker duration.
787784
* Setting seek of a stopped sound has no effect.
788-
*
785+
*
789786
* @name Phaser.Sound.WebAudioSound#seek
790787
* @type {number}
791788
* @fires Phaser.Sound.Events#SEEK
@@ -847,7 +844,7 @@ var WebAudioSound = new Class({
847844
*
848845
* @param {number} value - The point in the sound to seek to.
849846
*
850-
* @return {Phaser.Sound.WebAudioSound} This Sound instance.
847+
* @return {this} This Sound instance.
851848
*/
852849
setSeek: function (value)
853850
{
@@ -858,7 +855,7 @@ var WebAudioSound = new Class({
858855

859856
/**
860857
* Flag indicating whether or not the sound or current sound marker will loop.
861-
*
858+
*
862859
* @name Phaser.Sound.WebAudioSound#loop
863860
* @type {boolean}
864861
* @default false
@@ -899,7 +896,7 @@ var WebAudioSound = new Class({
899896
*
900897
* @param {boolean} value - `true` to loop this sound, `false` to not loop it.
901898
*
902-
* @return {Phaser.Sound.WebAudioSound} This Sound instance.
899+
* @return {this} This Sound instance.
903900
*/
904901
setLoop: function (value)
905902
{
@@ -915,7 +912,7 @@ var WebAudioSound = new Class({
915912
* @type {number}
916913
* @default 0
917914
* @fires Phaser.Sound.Events#PAN
918-
* @since 3.0.0
915+
* @since 3.50.0
919916
*/
920917
pan: {
921918

@@ -934,15 +931,15 @@ var WebAudioSound = new Class({
934931
},
935932

936933
/**
937-
* Sets the pan of this Sound.
934+
* Sets the pan of this sound, a value between -1 (full left pan) and 1 (full right pan).
938935
*
939936
* @method Phaser.Sound.WebAudioSound#setPan
940937
* @fires Phaser.Sound.Events#PAN
941-
* @since 3.4.0
938+
* @since 3.50.0
942939
*
943-
* @param {number} value - The pan of the sound.
940+
* @param {number} value - The pan of the sound. A value between -1 (full left pan) and 1 (full right pan).
944941
*
945-
* @return {Phaser.Sound.WebAudioSound} This Sound instance.
942+
* @return {this} This Sound instance.
946943
*/
947944
setPan: function (value)
948945
{

0 commit comments

Comments
 (0)