VGM Player v1.12 by Shiru (shiru@mail.ru) 01'10


  This code contains  software emulation  of the SN76489 sound chip,  which was
used in some of game consoles and computers of 1980s,  and player of VGM files.
These files contains sound data output log.  Code of player  is written in AS3,
and will work only with Flash Player 10.  It can be used as part of stand-alone
VGM player, similar to MP3 ones, or to adding authentic sound to Flash games in
'8-bit' style. VGM files are much smaller and has better quality than MP3 files
with same music, but the player code makes noticeable CPU overhead. You can use
Mod2PSG2 cross-tracker (http://mod2psg.kontechs.de/) to create new VGM music.


Limitations:

- SN76489 is not 100% accurate,  and it optimized for speed, not accuracy.
- Stereo capabilites of Sega Game Gear is not supported because this will
  increase CPU overhead greatly.


Methods of the VGMPlayer class:

load(Class):Boolean - load VGM file
unload():void - stop playing and unloading all data
play():void - start playing from beginning of the file
stop():void - stop playing
getTrackName():String - returns name of track (from GD3 tag)
getGameName():String - returns name of game (from GD3 tag)
getSystemName():String - returns name of system (from GD3 tag)
getOriginalAuthor():String - returns name of author (from GD3 tag)
getReleaseDate():String - returns release date (from GD3 tag)
getWhoConverted():String - returns name of who made VGM file (from GD3 tag)
setLooping(Boolean):void - force looping of the file
setSoundTransform(SoundTransform):void - volume and panning control
render(ByteArray,uint):void - render sound data to byte array


History:

03.01.10 - v1.12, bugfix for rare problem with player
22.07.09 - v1.11, speed optimizations
29.06.09 - v1.1, VGZ support and reading all the GD3 tags
24.06.09 - v1.01, additional speed optimizations
21.06.09 - v1.0, initial version