chore(logging): reduce verbosity for audio loading and input events

This commit is contained in:
2026-07-20 18:13:16 +08:00
parent 4d2b87bfcb
commit af63379bfa
3 changed files with 10 additions and 10 deletions

View File

@@ -46,8 +46,8 @@ AudioData AudioLoader::load_wav(const std::filesystem::path& path) {
drwav_read_pcm_frames_s16(&wav, wav.totalPCMFrameCount, data.pcm.data()); drwav_read_pcm_frames_s16(&wav, wav.totalPCMFrameCount, data.pcm.data());
drwav_uninit(&wav); drwav_uninit(&wav);
Logger::info("{} channels={} rate={} samples={}", path.filename().string(), Logger::debug("{} channels={} rate={} samples={}", path.filename().string(),
data.channels, data.sample_rate, data.pcm.size()); data.channels, data.sample_rate, data.pcm.size());
return data; return data;
} }
@@ -70,8 +70,8 @@ AudioData AudioLoader::load_mp3(const std::filesystem::path& path) {
data.pcm.assign(pcm, pcm + frame_count * config.channels); data.pcm.assign(pcm, pcm + frame_count * config.channels);
drmp3_free(pcm, nullptr); drmp3_free(pcm, nullptr);
Logger::info("{} channels={} rate={} samples={}", path.filename().string(), Logger::debug("{} channels={} rate={} samples={}", path.filename().string(),
data.channels, data.sample_rate, data.pcm.size()); data.channels, data.sample_rate, data.pcm.size());
return data; return data;
} }
@@ -93,8 +93,8 @@ AudioData AudioLoader::load_flac(const std::filesystem::path& path) {
data.pcm.assign(pcm, pcm + frame_count * channels); data.pcm.assign(pcm, pcm + frame_count * channels);
drflac_free(pcm, nullptr); drflac_free(pcm, nullptr);
Logger::info("{} channels={} rate={} samples={}", path.filename().string(), Logger::debug("{} channels={} rate={} samples={}", path.filename().string(),
data.channels, data.sample_rate, data.pcm.size()); data.channels, data.sample_rate, data.pcm.size());
return data; return data;
} }
@@ -134,8 +134,8 @@ AudioData AudioLoader::load_ogg(const std::filesystem::path& path) {
data.sample_rate = sample_rate; data.sample_rate = sample_rate;
data.pcm = std::move(pcm); data.pcm = std::move(pcm);
Logger::info("{} channels={} rate={} samples={}", path.filename().string(), Logger::debug("{} channels={} rate={} samples={}", path.filename().string(),
data.channels, data.sample_rate, data.pcm.size()); data.channels, data.sample_rate, data.pcm.size());
return data; return data;
} }

View File

@@ -355,7 +355,7 @@ bool WorldScene::handle_text_input_event(const TextInputEvent& e) {
if (m_paused) { if (m_paused) {
return m_pasue_menu.handle_text_input_event(e); return m_pasue_menu.handle_text_input_event(e);
} }
Logger::info("Hud ui handle text input");
return m_hud_ui.handle_text_input_event(e); return m_hud_ui.handle_text_input_event(e);
} }

View File

@@ -220,7 +220,7 @@ bool TextField::handle_mouse_button_event(const MouseButtonEvent& e) {
return false; return false;
} }
bool TextField::handle_text_input_event(const TextInputEvent& e) { bool TextField::handle_text_input_event(const TextInputEvent& e) {
Logger::info("Recive Text Input Event");
if (m_typing) { if (m_typing) {
m_input_text.append(e.text); m_input_text.append(e.text);
update_show_text(); update_show_text();