diff options
author | sfan5 <sfan5@live.de> | 2020-04-08 20:13:23 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-04-08 20:13:23 +0200 |
commit | de73f989eb1397b1103236031fd91309b294583c (patch) | |
tree | b2fae6ebca2468b17f7d9648eb63625b6b3712c1 /src/client/sound_openal.cpp | |
parent | 3494475df108e3401c6c8463a0aeae0f227fd1fa (diff) | |
download | hax-minetest-server-de73f989eb1397b1103236031fd91309b294583c.tar.gz hax-minetest-server-de73f989eb1397b1103236031fd91309b294583c.zip |
Overall improvements to log messages (#9598)
Hide some unnecessarily verbose ones behind --trace or disable them entirely.
Remove duplicate ones. Improve their contents in some places.
Diffstat (limited to 'src/client/sound_openal.cpp')
-rw-r--r-- | src/client/sound_openal.cpp | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/src/client/sound_openal.cpp b/src/client/sound_openal.cpp index 8e696f302..d0f935a7a 100644 --- a/src/client/sound_openal.cpp +++ b/src/client/sound_openal.cpp @@ -165,8 +165,8 @@ SoundBuffer *load_opened_ogg_file(OggVorbis_File *oggFile, << "preparing sound buffer" << std::endl; } - infostream << "Audio file " - << filename_for_logging << " loaded" << std::endl; + //infostream << "Audio file " + // << filename_for_logging << " loaded" << std::endl; // Clean up! ov_clear(oggFile); @@ -498,9 +498,11 @@ public: // Remove stopped sounds void maintain() { - verbosestream<<"OpenALSoundManager::maintain(): " - <<m_sounds_playing.size()<<" playing sounds, " - <<m_buffers.size()<<" sound names loaded"<<std::endl; + if (!m_sounds_playing.empty()) { + verbosestream << "OpenALSoundManager::maintain(): " + << m_sounds_playing.size() <<" playing sounds, " + << m_buffers.size() <<" sound names loaded"<<std::endl; + } std::unordered_set<int> del_list; for (const auto &sp : m_sounds_playing) { int id = sp.first; @@ -530,7 +532,7 @@ public: SoundBuffer *buf = load_ogg_from_file(filepath); if (buf) addBuffer(name, buf); - return false; + return !!buf; } bool loadSoundData(const std::string &name, @@ -539,7 +541,7 @@ public: SoundBuffer *buf = load_ogg_from_buffer(filedata, name); if (buf) addBuffer(name, buf); - return false; + return !!buf; } void updateListener(const v3f &pos, const v3f &vel, const v3f &at, const v3f &up) |