mirror of
https://github.com/ZDoom/gzdoom-gles.git
synced 2024-12-12 21:31:57 +00:00
41 lines
728 B
C
41 lines
728 B
C
|
#ifdef _WIN32
|
||
|
#define WIN32_LEAN_AND_MEAN
|
||
|
#include <windows.h>
|
||
|
#else
|
||
|
#include <SDL.h>
|
||
|
#endif
|
||
|
|
||
|
#include "muslib.h"
|
||
|
#include "files.h"
|
||
|
|
||
|
class OPLmusicBlock : public musicBlock
|
||
|
{
|
||
|
public:
|
||
|
OPLmusicBlock (FILE *file, int len, int rate, int maxSamples);
|
||
|
~OPLmusicBlock ();
|
||
|
bool IsValid () const;
|
||
|
|
||
|
bool ServiceStream (void *buff, int numbytes);
|
||
|
void Restart ();
|
||
|
void SetLooping (bool loop);
|
||
|
void ResetChips ();
|
||
|
int PlayTick ();
|
||
|
|
||
|
protected:
|
||
|
int SampleRate;
|
||
|
int NextTickIn;
|
||
|
int SamplesPerTick;
|
||
|
bool TwoChips;
|
||
|
bool Looping;
|
||
|
enum { NotRaw, RDosPlay, IMF } RawPlayer;
|
||
|
int ScoreLen;
|
||
|
|
||
|
int *SampleBuff;
|
||
|
|
||
|
#ifdef _WIN32
|
||
|
CRITICAL_SECTION ChipAccess;
|
||
|
#else
|
||
|
SDL_mutex *ChipAccess;
|
||
|
#endif
|
||
|
};
|