-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathModuleAudio.h
More file actions
45 lines (27 loc) · 771 Bytes
/
ModuleAudio.h
File metadata and controls
45 lines (27 loc) · 771 Bytes
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
#ifndef __ModuleAudio_H__
#define __ModuleAudio_H__
#include "Module.h"
#define DEFAULT_MUSIC_FADE_TIME 2.0f
enum effects {
};
class ModuleAudio : public Module
{
public:
ModuleAudio(Application* app, bool start_enabled = true);
~ModuleAudio();
bool Init();
bool CleanUp();
// Play a music file
bool PlayMusic(const char* path, float fade_time = DEFAULT_MUSIC_FADE_TIME);
// Load a WAV in memory
unsigned int LoadFx(const char* path);
// Play a previously loaded WAV
bool PlayFx(unsigned int fx, int repeat = 0, int channel = -1);
bool playingFX(int channel);
void StopMusic();
void StopFx(int channel = -1);
void ChangeMusicVolume(float v_music);
//void ChangeFxVolume(Mix_Chunk * fx, float v_fx);
private:
};
#endif // __ModuleAudio_H__