I'm trying to overcome a issue with lagging music and sounds in my project and I found This plugin (DSE_AudioLagFix.js).
Generaly starting music loads like it should, without freezing game for several mseconds, but I get following error:
I know I should place an ogg file in SE directory, but it's name is empty and in windows filename cannot be empty!
I made small modification in WebAudio.prototype._load = function(url) by removing following line
(if this will help here is full function from rpg_core.js)
Also I give you some technical data about my OGG's used as game music:
And it works now well but... I Don't think it's good idea, have you got any suggestions?
Generaly starting music loads like it should, without freezing game for several mseconds, but I get following error:
I made small modification in WebAudio.prototype._load = function(url) by removing following line
Code:
//xhr.onerror = this._loader || function(){this._hasError = true;}.bind(this);
(if this will help here is full function from rpg_core.js)
Code:
WebAudio.prototype._load = function(url) {
if (WebAudio._context) {
var xhr = new XMLHttpRequest();
if(Decrypter.hasEncryptedAudio) url = Decrypter.extToEncryptExt(url);
xhr.open('GET', url);
xhr.responseType = 'arraybuffer';
xhr.onload = function() {
if (xhr.status < 400) {
this._onXhrLoad(xhr);
}
}.bind(this);
xhr.onerror = this._loader || function(){this._hasError = true;}.bind(this);
xhr.send();
}
};
Also I give you some technical data about my OGG's used as game music:
Code:
Complete name : H:\***\audio\bgm\theme4.ogg
Format : Ogg
File size : 2.91 MiB
Duration : 3 min 35 s
Overall bit rate mode : Variable
Overall bit rate : 113 kb/s
Writing application : FL Studio
Audio
ID : 2582 (0xA16)
Format : Vorbis
Format settings, Floor : 1
Duration : 3 min 35 s
Bit rate mode : Variable
Bit rate : 112 kb/s
Channel(s) : 2 channels
Sampling rate : 44.1 kHz
Compression mode : Lossy
Stream size : 2.88 MiB (99%)
Writing library : libVorbis (⛄⛄⛄⛄) (20150105 (⛄⛄⛄⛄))
And it works now well but... I Don't think it's good idea, have you got any suggestions?