mirror of
https://github.com/photonstorm/phaser
synced 2024-11-24 13:43:26 +00:00
added applyConfig method to BaseSound class and calling it inside of WebAudioSound class play method
This commit is contained in:
parent
928487f7b1
commit
25bd3816c7
2 changed files with 6 additions and 1 deletions
|
@ -124,6 +124,11 @@ var BaseSound = new Class({
|
|||
stop: function () {
|
||||
return this;
|
||||
},
|
||||
applyConfig: function () {
|
||||
this.mute = this.currentConfig.mute;
|
||||
this.volume = this.currentConfig.volume;
|
||||
// TODO assign other config values to buffer source
|
||||
},
|
||||
fadeTo: function (volume, duration) {
|
||||
return null;
|
||||
},
|
||||
|
|
|
@ -60,9 +60,9 @@ var WebAudioSound = new Class({
|
|||
}
|
||||
this.currentConfig = Extend(this.currentConfig, config);
|
||||
this.source = this.manager.context.createBufferSource();
|
||||
// TODO assign config values to buffer source
|
||||
this.source.buffer = this.audioBuffer;
|
||||
this.source.connect(this.muteNode);
|
||||
this.applyConfig();
|
||||
this.source.start();
|
||||
return this;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue