Files
SDL3CPlusPlus/src/services/impl/audio_command_service.hpp
2026-01-08 03:20:44 +00:00

33 lines
1.0 KiB
C++

#pragma once
#include "../interfaces/i_audio_command_service.hpp"
#include "../interfaces/i_audio_service.hpp"
#include "../interfaces/i_config_service.hpp"
#include "../interfaces/i_logger.hpp"
#include <memory>
namespace sdl3cpp::services::impl {
/**
* @brief Script-facing audio command service implementation.
*/
class AudioCommandService : public IAudioCommandService {
public:
AudioCommandService(std::shared_ptr<IConfigService> configService,
std::shared_ptr<IAudioService> audioService,
std::shared_ptr<ILogger> logger);
bool QueueAudioCommand(AudioCommandType type,
const std::string& path,
bool loop,
std::string& error) override;
bool StopBackground(std::string& error) override;
private:
std::shared_ptr<IConfigService> configService_;
std::shared_ptr<IAudioService> audioService_;
std::shared_ptr<ILogger> logger_;
};
} // namespace sdl3cpp::services::impl