mirror of
https://github.com/ZDoom/gzdoom.git
synced 2024-11-08 22:11:09 +00:00
de85314234
waveforms, and three of them are non-negative. This can cause a tendency for the resulting output waveform to go into very high ranges depending on the timbres used, and Heretic's exemplify this problem. - Reduced the OPL volume level slightly. - Fixed: The waveform view from snd_drawoutput was upside-down. SVN r949 (trunk)
48 lines
922 B
C++
48 lines
922 B
C++
#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;
|
|
void OffsetSamples(float *buff, int count);
|
|
|
|
double NextTickIn;
|
|
double SamplesPerTick;
|
|
bool TwoChips;
|
|
bool Looping;
|
|
double LastOffset;
|
|
|
|
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;
|
|
};
|