Get the build fail to actually play and keep the building sound looping until the build is done.

This commit is contained in:
Zed A. Shaw 2024-09-16 17:24:02 -04:00
parent 2035a6dd00
commit 95cd84b09d
8 changed files with 8 additions and 9 deletions

View file

@ -17,7 +17,7 @@ using namespace nlohmann;
using namespace ImGui;
using std::string;
void SoundQuip::load(json &data, const char *file_key) {
void SoundQuip::load(json &data, const char *file_key, bool loop) {
auto audio = data["audio"];
json::string_t file_name = audio[file_key].template get<string>();
@ -26,6 +26,7 @@ void SoundQuip::load(json &data, const char *file_key) {
}
sound.setBuffer(buffer);
sound.setLoop(loop);
}
void SoundQuip::play() {