mirror of
https://github.com/photonstorm/phaser
synced 2024-11-24 05:33:35 +00:00
Defining detune property in BaseSound class so it can be used in both Web Audio and HTML5 Audio implementations
This commit is contained in:
parent
1c1e75ac85
commit
28ae0811e6
1 changed files with 15 additions and 0 deletions
|
@ -126,4 +126,19 @@ Object.defineProperty(BaseSoundManager.prototype, 'rate', {
|
|||
}, this);
|
||||
}
|
||||
});
|
||||
/**
|
||||
* Global detune.
|
||||
* @property {number} detune
|
||||
*/
|
||||
Object.defineProperty(BaseSoundManager.prototype, 'detune', {
|
||||
get: function () {
|
||||
return this._detune;
|
||||
},
|
||||
set: function (value) {
|
||||
this._detune = value;
|
||||
this.sounds.forEach(function (sound) {
|
||||
sound.setRate();
|
||||
}, this);
|
||||
}
|
||||
});
|
||||
module.exports = BaseSoundManager;
|
||||
|
|
Loading…
Reference in a new issue