diff options
author | Star Rauchenberger <fefferburbia@gmail.com> | 2022-03-16 15:30:37 -0400 |
---|---|---|
committer | Star Rauchenberger <fefferburbia@gmail.com> | 2022-03-16 15:30:37 -0400 |
commit | 2c75d95ddf849996bfc18267a9eecb4d0f4e1916 (patch) | |
tree | 285315deeaf4b5153b5f92f0c8a23af557626204 /src/muxer.cpp | |
parent | 8713d03831226dcd559c6a1e2b1c7b0d7c660bac (diff) | |
download | ether-2c75d95ddf849996bfc18267a9eecb4d0f4e1916.tar.gz ether-2c75d95ddf849996bfc18267a9eecb4d0f4e1916.tar.bz2 ether-2c75d95ddf849996bfc18267a9eecb4d0f4e1916.zip |
signs can be read now!
Diffstat (limited to 'src/muxer.cpp')
-rw-r--r-- | src/muxer.cpp | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/muxer.cpp b/src/muxer.cpp index 3450187..c93c45a 100644 --- a/src/muxer.cpp +++ b/src/muxer.cpp | |||
@@ -42,6 +42,18 @@ void Muxer::setPlayerLoc(int x, int y) { | |||
42 | ERRCHECK(system_->setListenerAttributes(0, &attributes)); | 42 | ERRCHECK(system_->setListenerAttributes(0, &attributes)); |
43 | } | 43 | } |
44 | 44 | ||
45 | void Muxer::playSound(std::string name) { | ||
46 | std::string eventPath = std::string("event:/") + name; | ||
47 | |||
48 | FMOD::Studio::EventDescription* eventDescription = nullptr; | ||
49 | ERRCHECK(system_->getEvent(eventPath.c_str(), &eventDescription)); | ||
50 | |||
51 | FMOD::Studio::EventInstance* eventInstance = nullptr; | ||
52 | ERRCHECK(eventDescription->createInstance(&eventInstance)); | ||
53 | ERRCHECK(eventInstance->start()); | ||
54 | ERRCHECK(eventInstance->release()); | ||
55 | } | ||
56 | |||
45 | void Muxer::playSoundAtPosition(std::string name, float x, float y) { | 57 | void Muxer::playSoundAtPosition(std::string name, float x, float y) { |
46 | std::string eventPath = std::string("event:/") + name; | 58 | std::string eventPath = std::string("event:/") + name; |
47 | 59 | ||