diff options
Diffstat (limited to 'src/muxer.h')
-rw-r--r-- | src/muxer.h | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/src/muxer.h b/src/muxer.h new file mode 100644 index 0000000..f99cce4 --- /dev/null +++ b/src/muxer.h | |||
@@ -0,0 +1,35 @@ | |||
1 | #ifndef MUXER_H_3146C802 | ||
2 | #define MUXER_H_3146C802 | ||
3 | |||
4 | #include <memory> | ||
5 | #include <string> | ||
6 | #include <fmod_studio_common.h> | ||
7 | #include <fmod_studio.hpp> | ||
8 | |||
9 | class fmod_system_deleter { | ||
10 | public: | ||
11 | void operator()(FMOD::Studio::System* val) { | ||
12 | val->release(); | ||
13 | } | ||
14 | }; | ||
15 | |||
16 | using fmod_system_ptr = std::unique_ptr<FMOD::Studio::System, fmod_system_deleter>; | ||
17 | |||
18 | class Muxer { | ||
19 | public: | ||
20 | Muxer(); | ||
21 | |||
22 | void setPlayerLoc(int x, int y); | ||
23 | |||
24 | void playSoundAtPosition(std::string name, float x, float y); | ||
25 | |||
26 | void setMusicLevel(int level); | ||
27 | |||
28 | void update(); | ||
29 | |||
30 | private: | ||
31 | fmod_system_ptr system_; | ||
32 | FMOD::Studio::EventInstance* exploration_event_; | ||
33 | }; | ||
34 | |||
35 | #endif /* end of include guard: MUXER_H_3146C802 */ | ||