I’ve found that it is impossible to play an audio file from inside a subfolder of ‘bgm’, ‘se’ or ‘me’, because the playBgm, playSe and playMe functions are defined in such a way that the files must necessarily be there. Veteran member Shaz says that
I’m just starting to get a hang of Javascript, but by the look of it, it seems like in the following portion, for example, one would have to change ‘se’ to some string variable that can be later accessed and modified from within the game.
How right or wrong am I?
What I’d like to know is if it would be possible to define such duplicate functions (to all the SE functions) in a way that you could choose the folder where the audio file is found on a case by case basis.
I’m just starting to get a hang of Javascript, but by the look of it, it seems like in the following portion, for example, one would have to change ‘se’ to some string variable that can be later accessed and modified from within the game.
Code:
AudioManager.playSe = function(se) {
if (se.name) {
this._seBuffers = this._seBuffers.filter(function(audio) {
return audio.isPlaying();
});
var buffer = this.createBuffer('se', se.name);
this.updateSeParameters(buffer, se);
buffer.play(false);
this._seBuffers.push(buffer);
}
};