mirror of
https://github.com/photonstorm/phaser
synced 2024-11-28 07:31:11 +00:00
defined detune property on WebAudioSoundManager prototype
This commit is contained in:
parent
7d7d8a7c75
commit
e456ee716b
1 changed files with 17 additions and 0 deletions
|
@ -101,4 +101,21 @@ Object.defineProperty(WebAudioSoundManager.prototype, 'rate', {
|
|||
}, this);
|
||||
}
|
||||
});
|
||||
/**
|
||||
* Global detune.
|
||||
* @property {number} detune
|
||||
*/
|
||||
Object.defineProperty(WebAudioSoundManager.prototype, 'detune', {
|
||||
get: function () {
|
||||
return this._detune;
|
||||
},
|
||||
set: function (value) {
|
||||
this._detune = value;
|
||||
this.sounds.forEach(function (sound) {
|
||||
// invoke sound's detune setter method to update
|
||||
// value based on new global detune value
|
||||
sound.detune = sound.detune;
|
||||
}, this);
|
||||
}
|
||||
});
|
||||
module.exports = WebAudioSoundManager;
|
||||
|
|
Loading…
Reference in a new issue