gzdoom-gles/src/oplsynth/opl_mus_player.h

47 lines
855 B
C
Raw Normal View History

#include "critsec.h"
#include "muslib.h"
#include "files.h"
class OPLmusicBlock : public musicBlock
{
public:
OPLmusicBlock();
virtual ~OPLmusicBlock();
bool ServiceStream(void *buff, int numbytes);
void ResetChips();
virtual void Restart();
protected:
virtual int PlayTick() = 0;
double NextTickIn;
double SamplesPerTick;
bool TwoChips;
bool Looping;
FCriticalSection ChipAccess;
};
class OPLmusicFile : public OPLmusicBlock
{
public:
OPLmusicFile(FILE *file, char *musiccache, int len);
OPLmusicFile(const OPLmusicFile *source, const char *filename);
virtual ~OPLmusicFile();
bool IsValid() const;
void SetLooping(bool loop);
void Restart();
void Dump();
protected:
OPLmusicFile() {}
int PlayTick();
enum { RDosPlay, IMF, DosBox } RawPlayer;
int ScoreLen;
int WhichChip;
};