Skip to content

Commit

Permalink
More code review feedback
Browse files Browse the repository at this point in the history
  • Loading branch information
walbourn committed Aug 13, 2024
1 parent c735975 commit 68785cb
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion Audio/SoundCommon.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -997,8 +997,11 @@ bool AudioEmitter::IsValid() const
if (ChannelCount == 0 || ChannelCount > XAUDIO2_MAX_AUDIO_CHANNELS)
return false;

if (pChannelAzimuths)
if (ChannelCount > 1)
{
if (!pChannelAzimuths)
return false;

for (uint32_t j = 0; j < ChannelCount; ++j)
{
if (pChannelAzimuths[j] < 0.f || pChannelAzimuths[j] > X3DAUDIO_2PI)
Expand Down

0 comments on commit 68785cb

Please sign in to comment.