-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathSoundManager.h
58 lines (44 loc) · 908 Bytes
/
SoundManager.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
#pragma once
/* To use sound:
need OpenAL, libsndfile libraries in project directory
uncomment next line
*/
//#define USE_SOUND
#ifdef USE_SOUND
#include "Constants.h"
#include <SFML/Audio.hpp>
#include <sstream>
/*
Sources for sound files:
Music:
http://incompetech.com/m/c/royalty-free/index.html?keywords=Arcane
Sound Effects:
Created using Audacity
*/
enum soundType {
TARGET_SOUND_0 = 0,
TARGET_SOUND_1,
TARGET_SOUND_2,
TARGET_SOUND_3,
TARGET_SOUND_4,
TARGET_SOUND_5,
TARGET_SOUND_6,
TARGET_SOUND_7
};
enum musicType {
MUSIC_0 = 0,
};
class SoundManager {
private:
std::vector<sf::Sound*> sounds;
std::vector<sf::Music*> music;
public:
SoundManager();
~SoundManager();
bool playSound(int type);
bool loopSound(int type);
void stopSound(int type);
bool playMusic(int type);
bool stopMusic(int type);
};
#endif