summaryrefslogtreecommitdiff
path: root/src/client/sound_openal.cpp
diff options
context:
space:
mode:
authorsfan5 <sfan5@live.de>2020-04-08 20:13:23 +0200
committerGitHub <noreply@github.com>2020-04-08 20:13:23 +0200
commitde73f989eb1397b1103236031fd91309b294583c (patch)
treeb2fae6ebca2468b17f7d9648eb63625b6b3712c1 /src/client/sound_openal.cpp
parent3494475df108e3401c6c8463a0aeae0f227fd1fa (diff)
downloadminetest-de73f989eb1397b1103236031fd91309b294583c.tar.gz
minetest-de73f989eb1397b1103236031fd91309b294583c.tar.bz2
minetest-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.cpp16
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)