AdPlug Player mini-SDK, (c) 2001 Simon Peter <dn.tlp@gmx.net>

Precautions:
------------
Your player normally consists of two files (the .h & .cpp files) and you normally
name them by the file extensions, your player handles. For example, the HSC player
consists of the files hsc.cpp & hsc.h, because it handles .hsc files. This is the
same with your player class name. Thus, the HSC player's class is called ChscPlayer.

player.h contains the abstract player interface. You have to include it in your
player to communicate with AdPlug. It also contains some very helpful structures
for use in your player. You don't need to use the structs, but you have to use
the methods provided by the opl object inside the player class to do the OPL I/O
and initialization work. These methods are declared inside opl.h.

Main Work:
----------
All you have to do now is to inherit the CPlayer class into your own player class
and fill the now undone methods with code. You at least have to fill in the
following methods:

bool load(istream &f);					// loads file
bool update();						// executes replay code for 1 tick
void rewind(unsigned int subsong = 0xffff);	// rewinds to specified subsong
float getrefresh();					// returns needed timer refresh rate
std::string gettype();					// returns file type

The other methods from CPlayer just serve informational purposes (as does
gettype, but it's required anyway) for AdPlug's info box and needn't to be filled.

Return true from your load() method, if the file was loaded successfully, or false
if it couldn't be loaded for any reason. Your update() method will be called with
the frequency, you return from your getrefresh() method, in Hz. Return true from
update() if your module hasn't ended yet. If it looped or ended, return false
from that point, but play further for any subsequent calls to update(). AdPlug
will rewind your player by itself using the rewind() function when necessary. If
rewind() is called with the argument 0xffff, rewind the current subsong.

AdPlug normally first calls load() and then getrefresh() and update() in a loop
until something happens (i.e. the user stops playback or the song ends). rewind()
and all the informational methods can be called anytime in between the other
calls, but of course only after load() has been called.

You can add your own constructors and destructors as you like. AdPlug won't care
in any way.
