home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
PC World 2006 July & August
/
PCWorld_2006-07-08_cd.bin
/
temacd
/
planearcade
/
planearcade.exe
/
Tank3.bmp
/
sound.h
< prev
next >
Wrap
C/C++ Source or Header
|
2004-10-23
|
1KB
|
64 lines
#ifndef _SOUND_H_
#define _SOUND_H_
//-----------------------------------------
//Public variables
//-----------------------------------------
extern ALCcontext *Context;
extern ALCdevice *Device;
//-----------------------------------------
//Public funtions
//-----------------------------------------
void InitializeSound();
void CleanUpSound();
//------------------------------------------------------------------
// Name: SOUND CLASS
// Desc: ***********
//------------------------------------------------------------------
class SOUND
{
private:
enum Format {Unknown, MP3, WavMidi,WavMidi3D};
//MP3
IGraphBuilder* m_pGraph;
IMediaControl* m_pMediaControl;
IMediaPosition* m_pMediaPosition;
//Wav3D
char* alBuffer;
ALenum alFormatBuffer;
ALsizei alFreqBuffer;
long alBufferLen;
unsigned int alSource;
unsigned int alSampleSet;
Format m_enumFormat;
public:
bool Stop();
bool Play(bool Loop = false);
void SetPosition(VECTOR3D Point,float Scale);
bool LoadSound(char* szSoundFilePath);
void InitialiseForWavMidi();
void InitialiseForWavMidi3D();
void InitialiseForMP3();
SOUND();
virtual ~SOUND();
};
#endif //_SOUND_H_