Skip to content

Commit 3b0face

Browse files
authored
Merge pull request phaserjs#2944 from samme/docs-sound-currenttime
Describe time units in Phaser.Sound
2 parents 3c76457 + 15a695a commit 3b0face

2 files changed

Lines changed: 7 additions & 6 deletions

File tree

v2-community/CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88

99
### Updates
1010

11+
* Clarification of time units in Phaser.Sound
1112
* Clarification of `group.exists` behavior
1213
* Clarification of fixedToCamera semantics
1314
* change Emitter.gravity from number to Phaser.Point

v2-community/src/sound/Sound.js

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -62,13 +62,13 @@ Phaser.Sound = function (game, key, volume, loop, connect) {
6262
this.totalDuration = 0;
6363

6464
/**
65-
* @property {number} startTime - The time the Sound starts at (typically 0 unless starting from a marker)
65+
* @property {number} startTime - The time the sound starts at in ms (typically 0 unless starting from a marker).
6666
* @default
6767
*/
6868
this.startTime = 0;
6969

7070
/**
71-
* @property {number} currentTime - The current time the sound is at.
71+
* @property {number} currentTime - The current time of sound playback in ms.
7272
*/
7373
this.currentTime = 0;
7474

@@ -83,12 +83,12 @@ Phaser.Sound = function (game, key, volume, loop, connect) {
8383
this.durationMS = 0;
8484

8585
/**
86-
* @property {number} position - The position of the current sound marker.
86+
* @property {number} position - The position of the current sound marker in ms.
8787
*/
8888
this.position = 0;
8989

9090
/**
91-
* @property {number} stopTime - The time the sound stopped.
91+
* @property {number} stopTime - The time the sound stopped in ms.
9292
*/
9393
this.stopTime = 0;
9494

@@ -99,12 +99,12 @@ Phaser.Sound = function (game, key, volume, loop, connect) {
9999
this.paused = false;
100100

101101
/**
102-
* @property {number} pausedPosition - The position the sound had reached when it was paused.
102+
* @property {number} pausedPosition - The position the sound had reached when it was paused in ms.
103103
*/
104104
this.pausedPosition = 0;
105105

106106
/**
107-
* @property {number} pausedTime - The game time at which the sound was paused.
107+
* @property {number} pausedTime - The game time (ms) at which the sound was paused.
108108
*/
109109
this.pausedTime = 0;
110110

0 commit comments

Comments
 (0)