vampirefrog wrote:
Can you make a stripped down version of vgmplay that only supports YM2612, SN76489, 32X PWM and RF5C164?
did you try it yet?
PS: The code needed to play one file would look like this (it shouldn't be difficult to add a little wrapper that is customized to your needs.. just make sure to use the proper callbacks so that the stuff that depends on async file loading is properly setup before you are trying to use it..):
function doOnTrackEnd(){ /* whatever you want to do when the played track ends */}
function doOnTrackReadyToPlay(){ ScriptNodePlayer.getInstance().play(); }
function doOnPlayerReady() {
/* once the player is ready you can start loading song files..*/
var p= ScriptNodePlayer.getInstance();
var options= {};
options.boostVolume= 0; // turn up to play louder
p.loadMusicFromURL('music/whatever.vgz', options,
(function(filename){ /* whatever you want to do when the file has been loaded */}),
(function(){ /* whatever you want to do on 'fail' */}),
(function(total, loaded){ /* whatever you want to do on 'load progress' */}));
}
ScriptNodePlayer.createInstance(new VgmBackendAdapter(), '', ["VGMPlay.ini", "yrw801.rom"], true,
doOnPlayerReady, doOnTrackReadyToPlay, doOnTrackEnd);
vampi edit: http://www.wothke.ch/download/backend_vgm.js