-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathAudioManager.h
More file actions
35 lines (28 loc) · 870 Bytes
/
AudioManager.h
File metadata and controls
35 lines (28 loc) · 870 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
#pragma once
#include <string>
using namespace std;
/*
*
*/
class AudioManager {
public:
AudioManager();
virtual ~AudioManager();
// supposed to be called before start using the object
virtual bool init() = 0;
// sound effects
virtual bool loadSound(int tag, string fileName) = 0;
virtual int playChannel(int tag, int loops, int channel = -1) = 0;
virtual void pauseChannel(int channel = -1) = 0;
virtual void resumeChanne(int channel = -1) = 0;
virtual void haltChannel(int channel = -1) = 0;
virtual int setChannelVolume(int volume, int channel = -1) = 0;
virtual int channels() = 0;
// music
virtual bool loadMusic(int tag, string fileName) = 0;
virtual void playMusic(int tag, int loops = -1) = 0;
virtual int setMusicVolume(int volume) = 0;
virtual void haltMusic() = 0;
virtual void pauseMusic() = 0;
virtual void resumeMusic() = 0;
};