From e79759329b3cf8df1bc5fd4bdbc5ca24eaf49f30 Mon Sep 17 00:00:00 2001 From: johndoe6345789 Date: Sun, 4 Jan 2026 14:59:01 +0000 Subject: [PATCH] refactor: Remove ExecuteAudioCommand from AudioManager, transitioning to service-based audio handling --- src/script/audio_manager.cpp | 15 --------------- 1 file changed, 15 deletions(-) diff --git a/src/script/audio_manager.cpp b/src/script/audio_manager.cpp index 73a6383..153b4a6 100644 --- a/src/script/audio_manager.cpp +++ b/src/script/audio_manager.cpp @@ -25,21 +25,6 @@ bool AudioManager::QueueAudioCommand(AudioCommandType type, std::string path, bo return true; } -void AudioManager::ExecuteAudioCommand(app::AudioPlayer* player, const AudioCommand& command) { - auto resolved = ResolveScriptPath(command.path); - if (!std::filesystem::exists(resolved)) { - throw std::runtime_error("Audio file not found: " + resolved.string()); - } - switch (command.type) { - case AudioCommandType::Background: - player->PlayBackground(resolved, command.loop); - break; - case AudioCommandType::Effect: - player->PlayEffect(resolved, command.loop); - break; - } -} - std::filesystem::path AudioManager::ResolveScriptPath(const std::string& requested) const { std::filesystem::path resolved(requested); if (!resolved.is_absolute()) {