Need the hit.wav to be mono, but now we have a sound we can move around, just not sure how to place it based on the visuals.
This commit is contained in:
parent
9102bdc8ad
commit
4ed06b10b1
11 changed files with 144 additions and 41 deletions
21
tests/sound.cpp
Normal file
21
tests/sound.cpp
Normal file
|
@ -0,0 +1,21 @@
|
|||
#include <catch2/catch_test_macros.hpp>
|
||||
#include <fmt/core.h>
|
||||
#include <string>
|
||||
#include "sound.hpp"
|
||||
#include "dinkyecs.hpp"
|
||||
|
||||
using DinkyECS::Entity;
|
||||
using namespace fmt;
|
||||
|
||||
TEST_CASE("confirm basic functionality", "[sounds]") {
|
||||
REQUIRE_THROWS([&](){SoundManager sounds("./BADassets");}());
|
||||
|
||||
SoundManager sounds("./assets");
|
||||
|
||||
REQUIRE_THROWS(sounds.load("hit", "badfileDOESNOTEXIST.wav"));
|
||||
REQUIRE_THROWS(sounds.play("hit"));
|
||||
|
||||
sounds.load("hit", "hit.wav");
|
||||
sounds.play("hit");
|
||||
sounds.playAt("hit", 1, 1, 1);
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue