-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathaudio.h
executable file
·48 lines (34 loc) · 1.09 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
/* Manages the audio in the game
*
*/
#pragma once
#include <iostream>
#include <xact3.h>
#include "constants.h"
class Audio {
private:
IXACT3Engine* xactEngine; // pointer to the XACT sound engine
IXACT3WaveBank *waveBank; // pointer to XACT wave bank
IXACT3SoundBank *soundBank; // pointer to XACT sound bank
IXACT3Wave *ppWave; // pointer to XACT wave object
XACTINDEX cueI; // XACT sound index
void *mapWaveBank; // call UnmapViewOfFile() to release file
void *soundBankData;
bool coInitialized; // set true if coInitialize is successful
public:
// constructor
Audio();
bool mute;
// destructor
virtual ~Audio();
// Initialise Audio
HRESULT initialise();
// Perform periodic sound engine tasks
void run();
// Play sound specified by cue from sound bank
// If cue does not exist no error occurs, there is simply no sound played
void playCue(const char[]);
// Stop a playing sound specified by cue from sound bank
// If cue does not exist no error occurs
void stopCue(const char[]);
};