Removed Debug logs from user-view
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
#include "audio_manager.h"
|
||||
#include "db/database_manager.h"
|
||||
#include "logger/logger.h"
|
||||
|
||||
#include <SDL3/SDL.h>
|
||||
@@ -104,10 +105,31 @@ namespace radiantwave::audio
|
||||
float gain = enabled_ ? (volume_ / 100.0f) : 0.0f;
|
||||
MIX_SetMixerGain(mixer_, gain);
|
||||
|
||||
logger::Logger::instance().info("Audio", "SDL3_mixer audio system initialized successfully");
|
||||
logger::Logger::instance().debug("Audio", "SDL3_mixer audio system initialized successfully");
|
||||
return true;
|
||||
}
|
||||
|
||||
void AudioManager::attachDatabase(db::DatabaseManager& db)
|
||||
{
|
||||
std::lock_guard<std::mutex> lock(mutex_);
|
||||
db_ = &db;
|
||||
}
|
||||
|
||||
std::string AudioManager::displayNameFor(const std::string& wav_filename) const
|
||||
{
|
||||
if (db_)
|
||||
{
|
||||
for (const auto& record : db_->getAudioFiles())
|
||||
{
|
||||
if (record.filename == wav_filename)
|
||||
{
|
||||
return record.display_name;
|
||||
}
|
||||
}
|
||||
}
|
||||
return wav_filename;
|
||||
}
|
||||
|
||||
float AudioManager::effectiveGain() const
|
||||
{
|
||||
return enabled_ ? (volume_ / 100.0f) : 0.0f;
|
||||
@@ -233,7 +255,7 @@ namespace radiantwave::audio
|
||||
std::lock_guard<std::mutex> lock(mutex_);
|
||||
currentDevice_ = raw_device_name;
|
||||
|
||||
logger::Logger::instance().info("Audio", "Switched audio output device to: " + mapToFriendlyDeviceName(raw_device_name));
|
||||
logger::Logger::instance().debug("Audio", "Switched audio output device to: " + mapToFriendlyDeviceName(raw_device_name));
|
||||
|
||||
if (configManager_)
|
||||
{
|
||||
@@ -301,7 +323,7 @@ namespace radiantwave::audio
|
||||
slot.fadeInElapsed = 0.0f;
|
||||
MIX_SetTrackGain(slot.track, 0.0f);
|
||||
MIX_PlayTrack(slot.track, 0); // Loop playback
|
||||
logger::Logger::instance().info("Audio", "Started playback of " + currentTrack_ + " (fade-in)");
|
||||
logger::Logger::instance().info("Audio", "Started playback of " + displayNameFor(currentTrack_) + " (fade-in)");
|
||||
}
|
||||
|
||||
bool AudioManager::playTrack(const std::string &wav_filename)
|
||||
@@ -325,7 +347,7 @@ namespace radiantwave::audio
|
||||
{ cfg.audio.current_track = wav_filename; });
|
||||
}
|
||||
|
||||
logger::Logger::instance().info("Audio", "Started playback of " + wav_filename);
|
||||
logger::Logger::instance().info("Audio", "Started playback of " + displayNameFor(wav_filename));
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user