gzdoom/src/oplsynth/opl_mus_player.h
Randy Heit 3b0ad55285 - Since our OPL chips are emulated, we can give them a feature that real OPL2 chips lacked:
Full stereo panning for the MIDI player. (The raw OPL players are unaffected.) To get the
  mono output back, you can set opl_stereo to false.
- Changed SoftSynthMIDIDevice::OpenStream() to allocate the same number of samples for stereo
  and mono streams.

SVN r3929 (trunk)
2012-11-02 03:25:50 +00:00

48 lines
929 B
C++

#include "critsec.h"
#include "muslib.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;
void OffsetSamples(float *buff, int count);
double NextTickIn;
double SamplesPerTick;
bool TwoChips;
bool Looping;
double LastOffset;
bool IsStereo;
FCriticalSection ChipAccess;
};
class OPLmusicFile : public OPLmusicBlock
{
public:
OPLmusicFile(FILE *file, BYTE *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, DosBox1, DosBox2 } RawPlayer;
int ScoreLen;
int WhichChip;
};