fuck audio for microdummies
parent
4b479b599d
commit
3bc46a2d6f
|
@ -80,19 +80,23 @@ GameLib.D3.Audio.prototype.createInstance = function() {
|
||||||
|
|
||||||
console.log('loading audio : ' + this.name);
|
console.log('loading audio : ' + this.name);
|
||||||
|
|
||||||
//Load a sound and set it as the Audio object's buffer
|
if (document.documentMode || /Edge/.test(navigator.userAgent)) {
|
||||||
|
GameLib.Component.prototype.createInstance.call(this);
|
||||||
|
} else {
|
||||||
audioLoader.load(
|
audioLoader.load(
|
||||||
this.apiUrl + this.path + '?ts=' + Date.now(),
|
this.apiUrl + this.path + '?ts=' + Date.now(),
|
||||||
function( buffer ) {
|
function (buffer) {
|
||||||
|
|
||||||
console.log('loaded audio: ' + this.name);
|
console.log('loaded audio: ' + this.name);
|
||||||
|
|
||||||
this.instance.setBuffer( buffer );
|
this.instance.setBuffer(buffer);
|
||||||
this.instance.setLoop( this.loop );
|
this.instance.setLoop(this.loop);
|
||||||
this.instance.setVolume( this.volume );
|
this.instance.setVolume(this.volume);
|
||||||
GameLib.Component.prototype.createInstance.call(this);
|
GameLib.Component.prototype.createInstance.call(this);
|
||||||
}.bind(this)
|
}.bind(this)
|
||||||
);
|
);
|
||||||
|
}
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
Loading…
Reference in New Issue