little sound json thingy

This commit is contained in:
Green Sky 2022-02-07 22:43:37 +01:00
parent 6aa7e3899e
commit 592138845c
2 changed files with 12 additions and 0 deletions

View File

@ -85,6 +85,7 @@ target_link_libraries(imgui_sound_test
imgui_service imgui_service
imgui_render_task imgui_render_task
imgui_sound imgui_sound
soloud_json
imgui_tools imgui_tools
gtest_main gtest_main
) )

View File

@ -20,6 +20,7 @@
#include <mm/imgui/widgets/soloud.hpp> #include <mm/imgui/widgets/soloud.hpp>
#include <imgui/imgui.h> #include <imgui/imgui.h>
#include <imgui/misc/cpp/imgui_stdlib.h>
#include <soloud_speech.h> #include <soloud_speech.h>
#include <soloud_sfxr.h> #include <soloud_sfxr.h>
@ -27,6 +28,10 @@
#include <soloud_echofilter.h> #include <soloud_echofilter.h>
#include <soloud_lofifilter.h> #include <soloud_lofifilter.h>
#include <mm/soloud_json.hpp>
#include <nlohmann/json.hpp>
const char* argv0; const char* argv0;
using namespace entt::literals; using namespace entt::literals;
@ -121,6 +126,12 @@ class ImGuiSpeechy : public MM::Services::Service {
MM::ImGuiWidgets::SoLoudFilterLiveParamsFancy("filter fancy freeverb", &sound.engine, &freeverb, 2); MM::ImGuiWidgets::SoLoudFilterLiveParamsFancy("filter fancy freeverb", &sound.engine, &freeverb, 2);
} }
ImGui::End(); ImGui::End();
if (ImGui::Begin("Sfxr json")) {
std::string json_text = nlohmann::json(sfxr).dump(2);
ImGui::InputTextMultiline("json", &json_text);
}
ImGui::End();
} }
}; };