mirror of
https://github.com/ZDoom/raze-gles.git
synced 2024-12-26 11:40:44 +00:00
7b0104e9a1
git-svn-id: https://svn.eduke32.com/eduke32@452 1a8010ca-5511-0410-912e-c29ae57300e0
46 lines
1.2 KiB
C++
Executable file
46 lines
1.2 KiB
C++
Executable file
#ifndef __waveformfile_hpp__
|
|
#define __waveformfile_hpp__
|
|
|
|
#include "soundfile.hpp"
|
|
#include "pcmbuffer.hpp"
|
|
|
|
class WaveformFile : public SoundFile {
|
|
public:
|
|
typedef enum {
|
|
FORMAT_UNKNOWN = -1,
|
|
FORMAT_FIRST = 0,
|
|
FORMAT_RAW = 0,
|
|
FORMAT_RIFFWAV,
|
|
FORMAT_AIFF,
|
|
FORMAT_VOC,
|
|
FORMAT_AU,
|
|
FORMAT_OGGVORBIS,
|
|
FORMAT_FLAC,
|
|
FORMAT_MPEG,
|
|
FORMAT_MOD,
|
|
FORMAT_LAST = FORMAT_MOD
|
|
} Format;
|
|
|
|
WaveformFile() { }
|
|
virtual ~WaveformFile() { }
|
|
|
|
virtual Type GetType() const { return TYPE_WAVEFORM; }
|
|
virtual const char *GetTypeName() const { return "waveform"; }
|
|
virtual Format GetFormat() const = 0;
|
|
virtual const char *GetFormatName() const = 0;
|
|
|
|
// Sub-classes should implement these
|
|
//static InitState Init() { return InitDisabled; }
|
|
//static bool Uninit() { return false; }
|
|
|
|
virtual PcmBuffer *ReadSamples(unsigned int nsamps = 0, bool loop = false) = 0;
|
|
virtual float GetPlayTime(void) const = 0;
|
|
virtual unsigned int GetPCMLength(void) const = 0;
|
|
// return 0x7fffffff if length is unknown, which will force streaming
|
|
};
|
|
|
|
bool InitialiseWaveformReaders(void);
|
|
void UninitialiseWaveformReaders(void);
|
|
WaveformFile *IdentifyWaveformFile(JFAudFile *);
|
|
|
|
#endif
|