Skip to content

Commit eb5be4c

Browse files
Defined detune property setter to be able to use checkTouchLocked with it
1 parent 865f8d0 commit eb5be4c

1 file changed

Lines changed: 15 additions & 0 deletions

File tree

src/sound/html5/HTML5AudioSound.js

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -335,6 +335,21 @@ Object.defineProperty(HTML5AudioSound.prototype, 'rate', {
335335
Object.getOwnPropertyDescriptor(BaseSound.prototype, 'rate').set.call(this, value);
336336
}
337337
});
338+
/**
339+
* Detuning of sound.
340+
*
341+
* @name Phaser.Sound.HTML5AudioSound#detune
342+
* @property {number} detune
343+
*/
344+
Object.defineProperty(HTML5AudioSound.prototype, 'detune', {
345+
set: function (value) {
346+
this.currentConfig.detune = value;
347+
if (this.checkTouchLocked('property', 'detune', value)) {
348+
return;
349+
}
350+
Object.getOwnPropertyDescriptor(BaseSound.prototype, 'detune').set.call(this, value);
351+
}
352+
});
338353
/**
339354
* Current position of playing sound.
340355
*

0 commit comments

Comments
 (0)