diff options
| author | heavydemon21 <nielsstunnebrink1@gmail.com> | 2024-10-22 11:35:47 +0200 |
|---|---|---|
| committer | heavydemon21 <nielsstunnebrink1@gmail.com> | 2024-10-22 11:35:47 +0200 |
| commit | 176ac90fce318334f1377d94d6e637e1eff84c3c (patch) | |
| tree | 104b86fc3537fd82c7b9dd731ee716c51441ca31 /src/dummy_audio.cpp | |
| parent | edfcb27fe37fdcf08622863f331960325e3899ac (diff) | |
| parent | 77555730e3ddb811b9ce8470659663e3f1573de2 (diff) | |
Merge branch 'master' into niels/rendering
Diffstat (limited to 'src/dummy_audio.cpp')
| -rw-r--r-- | src/dummy_audio.cpp | 40 |
1 files changed, 0 insertions, 40 deletions
diff --git a/src/dummy_audio.cpp b/src/dummy_audio.cpp deleted file mode 100644 index 211a503..0000000 --- a/src/dummy_audio.cpp +++ /dev/null @@ -1,40 +0,0 @@ -#include "crepe/facade/Sound.h" -#include "crepe/util/log.h" - -#include <chrono> -#include <thread> - -using namespace crepe; -using namespace std; -using namespace std::chrono_literals; -using std::make_unique; - -int main() { - dbg_trace(); - - auto bgm = Sound("../mwe/audio/bgm.ogg"); - auto sfx1 = Sound("../mwe/audio/sfx1.wav"); - auto sfx2 = Sound("../mwe/audio/sfx2.wav"); - auto sfx3 = Sound("../mwe/audio/sfx3.wav"); - - bgm.play(); - - // play each sample sequentially - this_thread::sleep_for(500ms); - sfx1.play(); - this_thread::sleep_for(500ms); - sfx2.play(); - bgm.pause(); - this_thread::sleep_for(500ms); - sfx3.play(); - bgm.play(); - this_thread::sleep_for(500ms); - - // play all samples simultaniously - sfx1.play(); - sfx2.play(); - sfx3.play(); - this_thread::sleep_for(1000ms); - - return 0; -} |