dhewm3/neo/sound/efxlib.h

66 lines
1,007 B
C
Raw Normal View History

2011-11-22 21:28:15 +00:00
/*
*/
#ifndef __EFXLIBH
#define __EFXLIBH
#if ID_OPENAL_EAX
2011-12-11 15:13:49 +00:00
#include <eax4.h>
#endif
2011-11-22 21:28:15 +00:00
#include "idlib/containers/List.h"
#include "idlib/Str.h"
#include "idlib/Lexer.h"
#include "idlib/Heap.h"
#include "sound/sound.h"
2011-11-22 21:28:15 +00:00
///////////////////////////////////////////////////////////
// Class definitions.
class idSoundEffect
{
public:
idSoundEffect() {
};
2011-12-11 15:02:05 +00:00
~idSoundEffect() {
2011-11-22 21:28:15 +00:00
if ( data && datasize ) {
Mem_Free( data );
data = NULL;
}
}
2011-12-11 15:02:05 +00:00
2011-11-22 21:28:15 +00:00
idStr name;
int datasize;
void *data;
};
class idEFXFile
{
private:
protected:
// Protected data members.
public:
// Public data members.
private:
2011-12-11 15:02:05 +00:00
2011-11-22 21:28:15 +00:00
public:
idEFXFile();
~idEFXFile();
bool FindEffect( idStr &name, idSoundEffect **effect, int *index );
bool ReadEffect( idLexer &lexer, idSoundEffect *effect );
bool LoadFile( const char *filename, bool OSPath = false );
void UnloadFile( void );
void Clear( void );
idList<idSoundEffect *>effects;
};
///////////////////////////////////////////////////////////
#endif // __EFXLIBH