Merge branch 'xxSeys1-UnifyAudioListenerWarnings'
This commit is contained in:
@@ -37,15 +37,17 @@ void AudioListener::OnEnable()
|
||||
{
|
||||
_prevPos = GetPosition();
|
||||
_velocity = Vector3::Zero;
|
||||
|
||||
ASSERT(!Audio::Listeners.Contains(this));
|
||||
if (Audio::Listeners.Count() >= AUDIO_MAX_LISTENERS)
|
||||
{
|
||||
LOG(Error, "Unsupported amount of the audio listeners!");
|
||||
if IF_CONSTEXPR (AUDIO_MAX_LISTENERS == 1)
|
||||
LOG(Warning, "There is more than one Audio Listener active. Please make sure only exactly one is active at any given time.");
|
||||
else
|
||||
LOG(Warning, "Too many Audio Listener active.");
|
||||
}
|
||||
else
|
||||
{
|
||||
ASSERT(!Audio::Listeners.Contains(this));
|
||||
if (Audio::Listeners.Count() > 0)
|
||||
LOG(Warning, "There is more than one Audio Listener active. Please make sure only exactly one is active at any given time.");
|
||||
Audio::Listeners.Add(this);
|
||||
AudioBackend::Listener::Reset();
|
||||
AudioBackend::Listener::TransformChanged(GetPosition(), GetOrientation());
|
||||
|
||||
Reference in New Issue
Block a user