forked from littlebalup/ZeldaROTH
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Audio.h
50 lines (40 loc) · 1.06 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
/*
Zelda Return of the Hylian
Copyright (C) 2005-2008 Vincent Jouillat
Please send bugreports with examples or suggestions to www.zeldaroth.fr
*/
#ifndef __AUDIO_H__
#define __AUDIO_H__
#include <SDL/SDL_mixer.h>
class Audio {
public :
Audio();
~Audio();
void playSound(int id, int chl = -1);
void playMusic(int id);
void stopMusic();
void replayMusic();
void playSpecial(int id);
void stopSpecial();
void setVolume(int volume);
void setVolson(int volson);
private :
void loadSounds();
void freeSounds();
void freeMusic();
Mix_Chunk* getSound(const char *son);
Mix_Music* getMusic(const char *zik);
Mix_Music* choixMusique(int id);
Mix_Music* choixSpecial(int id);
bool SOUND;
int previous_volume;
int musiqueId;
int specialId;
#ifdef __vita__
char* mem;
FILE* f;
#endif
Mix_Chunk** sons;
Mix_Music* music;
};
#endif // Audio.h