@shockra No, it takes an object, not a filename.
You see that it references things like se.name, which are variables within an object, so se cannot be simply a filename.
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);
}
};
@XGuarden I found it-- the problem here is the double quotes. Script commands execute using eval and because of this have problems when there are quotation marks identical to what javascript uses by default (it breaks the eval string) so you need to use single quotes:
Code:
AudioManager.playSe({name: 'filename', pan: 0, pitch: 100, volume: 100});