Skip to content

Commit fd96a32

Browse files
Moved isPlaying and isPaused flags initialisation above setting config options since they are used in some of the config options' setters (detune, rate)
1 parent 97441f3 commit fd96a32

1 file changed

Lines changed: 15 additions & 22 deletions

File tree

v3/src/sound/BaseSound.js

Lines changed: 15 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,20 @@ var BaseSound = new Class({
3535
* @property {ISoundConfig} currentConfig
3636
*/
3737
this.currentConfig = this.config;
38+
/**
39+
* Flag indicating if sound is currently playing.
40+
*
41+
* @readonly
42+
* @property {boolean} isPlaying
43+
*/
44+
this.isPlaying = false;
45+
/**
46+
* Flag indicating if sound is currently paused.
47+
*
48+
* @readonly
49+
* @property {boolean} isPaused
50+
*/
51+
this.isPaused = false;
3852
/**
3953
* [description]
4054
*
@@ -83,12 +97,6 @@ var BaseSound = new Class({
8397
* @property {boolean} loop
8498
*/
8599
this.loop = false;
86-
/**
87-
* [description]
88-
*
89-
* @property {number} pan
90-
*/
91-
this.pan = 0;
92100
this.config = Extend(this.config, config);
93101
/**
94102
* A value representing the duration, in seconds.
@@ -105,20 +113,6 @@ var BaseSound = new Class({
105113
* @property {number}
106114
*/
107115
this.totalDuration = 0;
108-
/**
109-
* Flag indicating if sound is currently playing.
110-
*
111-
* @readonly
112-
* @property {boolean} isPlaying
113-
*/
114-
this.isPlaying = false;
115-
/**
116-
* Flag indicating if sound is currently paused.
117-
*
118-
* @readonly
119-
* @property {boolean} isPaused
120-
*/
121-
this.isPaused = false;
122116
/**
123117
* Object containing markers definitions.
124118
*
@@ -172,8 +166,7 @@ var BaseSound = new Class({
172166
rate: 1,
173167
detune: 0,
174168
seek: 0,
175-
loop: false,
176-
pan: 0
169+
loop: false
177170
}
178171
}, marker);
179172
this.markers[marker.name] = marker;

0 commit comments

Comments
 (0)