From e6072c9f1e4c29e038d6125fb0215e6f8075d0a8 Mon Sep 17 00:00:00 2001 From: "Zed A. Shaw" Date: Thu, 13 Nov 2025 12:13:58 -0500 Subject: [PATCH] [BROKEN] I have audio for a basic cutscene that's about the most cringe thing you can ever hear so you can't hear it. --- assets/config.json | 2 +- storyboard/ui.cpp | 8 +++----- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/assets/config.json b/assets/config.json index ad49a19..89e80a1 100644 --- a/assets/config.json +++ b/assets/config.json @@ -1,6 +1,6 @@ { "sounds": { - "epic_theme": "assets/sounds/epic_theme.mp3", + "rat_king_fight": "assets/sounds/RatKing_Fight_Audio-Master.ogg", "Sword_Hit_1": "assets/sounds/Creature_Sounds-Sword_Hit_1.ogg", "Evil_Eye_Sound_1": "assets/sounds/Creature_Sounds-Evil_Eye_Sound_1.ogg", "Evil_Eye_Sound_2": "assets/sounds/Creature_Sounds-Evil_Eye_Sound_2.ogg", diff --git a/storyboard/ui.cpp b/storyboard/ui.cpp index 0f6dd79..1e1278c 100644 --- a/storyboard/ui.cpp +++ b/storyboard/ui.cpp @@ -11,12 +11,12 @@ namespace storyboard { UI::UI(const std::string& story_name) : $view_texture({SCREEN_WIDTH, SCREEN_HEIGHT}), - $view_sprite($view_texture.getTexture()), - $audio(sound::get_sound_pair("ambient_1").sound) + $view_sprite($view_texture.getTexture()) { $view_sprite.setPosition({0, 0}); auto config = settings::get("stories"); $story = components::convert(config[story_name]); + $audio = sound::get_sound_pair($story.audio).sound; } void UI::init() { @@ -32,8 +32,7 @@ namespace storyboard { } $ui.layout($layout); - - sound::play($story.audio, true); + $audio->play(); } void UI::render(sf::RenderWindow &window) { @@ -60,7 +59,6 @@ namespace storyboard { void UI::track_audio() { auto& beat = $story.beats[cur_beat % $story.beats.size()]; - auto track_head = $audio->getPlayingOffset(); auto next_beat = parse_time_code(beat[0]);