mirror of
https://github.com/ZDoom/raze-gles.git
synced 2024-11-18 18:21:38 +00:00
7b0104e9a1
git-svn-id: https://svn.eduke32.com/eduke32@452 1a8010ca-5511-0410-912e-c29ae57300e0
35 lines
1,018 B
C++
Executable file
35 lines
1,018 B
C++
Executable file
#ifndef __midifile_smf_hpp__
|
|
#define __midifile_smf_hpp__
|
|
|
|
#include "midifile.hpp"
|
|
|
|
class MidiFile_SMF : public MidiFile {
|
|
private:
|
|
bool isvalid, isusable;
|
|
|
|
unsigned numtracks, ppqn;
|
|
int datastart;
|
|
|
|
JFAudFile *fh;
|
|
|
|
public:
|
|
MidiFile_SMF(JFAudFile *);
|
|
virtual ~MidiFile_SMF();
|
|
virtual bool IsValid() const { return isvalid; }
|
|
virtual bool IsUsable() const { return isusable; }
|
|
|
|
static InitState Init() { return InitOK; }
|
|
static bool Uninit() { return true; }
|
|
|
|
// these static versions retrieve the identifiers for this particular class
|
|
static Format GetClassFormat() { return FORMAT_SMF; }
|
|
static const char *GetClassFormatName() { return "Standard MIDI"; }
|
|
// these virtual versions return the identifier based on whether the file is valid or not
|
|
virtual Format GetFormat() const { return isvalid ? FORMAT_SMF : FORMAT_UNKNOWN; }
|
|
virtual const char *GetFormatName() const { return isvalid ? "Standard MIDI" : NULL; }
|
|
|
|
virtual MidiBuffer *ReadData(void);
|
|
};
|
|
|
|
#endif
|
|
|