mirror of
https://github.com/minetest/minetest.git
synced 2024-12-28 08:57:30 +01:00
Warn only once about positional stereo sounds (#13895)
This commit is contained in:
parent
6fdc7e0dad
commit
6026003508
@ -164,10 +164,13 @@ std::shared_ptr<PlayingSound> OpenALSoundManager::createPlayingSound(
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
if (lsnd->m_decode_info.is_stereo && pos_vel_opt.has_value()) {
|
||||
if (lsnd->m_decode_info.is_stereo && pos_vel_opt.has_value()
|
||||
&& m_warned_positional_stereo_sounds.find(sound_name)
|
||||
== m_warned_positional_stereo_sounds.end()) {
|
||||
warningstream << "OpenALSoundManager::createPlayingSound: "
|
||||
<< "Creating positional stereo sound \"" << sound_name << "\"."
|
||||
<< std::endl;
|
||||
m_warned_positional_stereo_sounds.insert(sound_name);
|
||||
}
|
||||
|
||||
ALuint source_id;
|
||||
|
@ -77,6 +77,9 @@ private:
|
||||
// if true, all sounds will be directly paused after creation
|
||||
bool m_is_paused = false;
|
||||
|
||||
// used for printing warnings only once
|
||||
std::unordered_set<std::string> m_warned_positional_stereo_sounds;
|
||||
|
||||
public:
|
||||
// used for communication with ProxySoundManager
|
||||
MutexedQueue<SoundManagerMsgToMgr> m_queue_to_mgr;
|
||||
|
Loading…
Reference in New Issue
Block a user