From 445db77bb0808c040c4179ac3284704cd8b35502 Mon Sep 17 00:00:00 2001 From: johndoe6345789 Date: Sun, 4 Jan 2026 14:58:48 +0000 Subject: [PATCH] refactor: Remove AudioPlayer integration from AudioManager and transition to service-based audio handling --- src/script/audio_manager.cpp | 15 ++------------- src/script/audio_manager.hpp | 4 ++-- 2 files changed, 4 insertions(+), 15 deletions(-) diff --git a/src/script/audio_manager.cpp b/src/script/audio_manager.cpp index 18bb8d7..b4318d7 100644 --- a/src/script/audio_manager.cpp +++ b/src/script/audio_manager.cpp @@ -1,5 +1,4 @@ #include "script/audio_manager.hpp" -#include "app/audio_player.hpp" #include "logging/logger.hpp" #include @@ -15,18 +14,8 @@ AudioManager::AudioManager(const std::filesystem::path& scriptDirectory) } void AudioManager::SetAudioPlayer(app::AudioPlayer* audioPlayer) { - audioPlayer_ = audioPlayer; - if (!audioPlayer_) { - return; - } - for (const auto& command : pendingAudioCommands_) { - try { - ExecuteAudioCommand(audioPlayer_, command); - } catch (const std::exception& exc) { - sdl3cpp::logging::Logger::GetInstance().Error("AudioPlayer command execution failed: " + std::string(exc.what())); - } - } - pendingAudioCommands_.clear(); + // Stub - audio functionality now handled through services + sdl3cpp::logging::Logger::GetInstance().Trace("AudioManager::SetAudioPlayer: Stub implementation - using services now"); } bool AudioManager::QueueAudioCommand(AudioCommandType type, std::string path, bool loop, std::string& error) { diff --git a/src/script/audio_manager.hpp b/src/script/audio_manager.hpp index a93974f..a29ce66 100644 --- a/src/script/audio_manager.hpp +++ b/src/script/audio_manager.hpp @@ -28,10 +28,10 @@ public: private: std::filesystem::path scriptDirectory_; - app::AudioPlayer* audioPlayer_ = nullptr; + // app::AudioPlayer* audioPlayer_ = nullptr; // Removed - using services now std::vector pendingAudioCommands_; - void ExecuteAudioCommand(app::AudioPlayer* player, const AudioCommand& command); + // void ExecuteAudioCommand(app::AudioPlayer* player, const AudioCommand& command); // Removed - using services now std::filesystem::path ResolveScriptPath(const std::string& requested) const; };