-
Notifications
You must be signed in to change notification settings - Fork 2
/
Audio.h
79 lines (60 loc) · 1.85 KB
/
Audio.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
//-----------------------------------------------------------------------------
// File: Audio.h
//
// Desc: Declaration file for the audio class
//
// Copyright (c) 2001 Dan
//-----------------------------------------------------------------------------
#ifndef _AUDIO_H_
#define _AUDIO_H_
//-----------------------------------------------------------------------------
// Includes
//#include <fmod.h>
//#include "Singleton.h"
//#include "Buffer.h"
//#include "Camera.h"
//-----------------------------------------------------------------------------
typedef struct
{
// The ID is unique to each sound. It is also the index of the sound
// in the m_Sounds[] array;
int ID;
// Full path and file name to the sound sample
CBuffer strFile;
} HSOUND, *LPHSOUND;
#define MAX_SOUNDS 128
//-----------------------------------------------------------------------------
// Name: class CAudio
// Desc:
//-----------------------------------------------------------------------------
/*
class CAudio : public CSingleton<CAudio>
{
public:
CAudio();
virtual ~CAudio();
bool Init();
bool Release();
unsigned int GetNumSounds() const { return m_NumSounds; }
bool LoadSound( const char* str, HSOUND &hSound );
bool RemoveSound( const HSOUND hSound );
bool PlaySound( const HSOUND hSound, VECT vPosition, VECT vVelocity );
bool StopSound( const HSOUND hSound );
bool SetMusicPlaylist( const char* str );
bool SetListenerPos( CCamera* camera, VECT m_vVelocity );
void Reset();
bool Render();
private:
typedef struct
{
// FSOUND_SAMPLE* sound;
CBuffer strFile;
} SOUNDSAMPLE;
bool IsAlreadyLoaded( const char* str );
SOUNDSAMPLE m_Sounds[MAX_SOUNDS];
unsigned int m_NumSounds;
};
*/
//#define AudioManager CAudio::GetSingletonPtr()
//#define AM CAudio::GetSingletonPtr()
#endif