-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathSoundManager.h
More file actions
30 lines (26 loc) · 759 Bytes
/
SoundManager.h
File metadata and controls
30 lines (26 loc) · 759 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
#ifndef SOUNDMANAGER_H
#define SOUNDMANAGER_H
#include <SFML/Audio.hpp>
using namespace sf;
using namespace std;
class SoundManager
{
public:
enum Sounds{Explosion,Victory,FlagOn,FlagOff,Reveal,GameMusic,MenuMusic};
SoundManager();
void play(Sounds sound);
void stop(Sounds sound);
void stopAll();
void changeVolumeSoundEffects(float delta);
void changeVolumeMusics(float delta);
void setVolumeSoundEffects(float value);
void setVolumeMusics(float value);
float getSoundEffectVolume();
float getMusicVolume();
bool isPlaying(Sounds sound);
protected:
private:
vector<Sound> sounds;
vector<SoundBuffer> buffers;
};
#endif // SOUNDMANAGER_H