Skip to content

Commit

Permalink
Ignore a maybe-uninitialized warning in AudioStreamPlayer3D.
Browse files Browse the repository at this point in the history
  • Loading branch information
Relintai committed Jun 18, 2024
1 parent 946092e commit 05f19a0
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions scene/3d/audio_stream_player_3d.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,9 @@ void AudioStreamPlayer3D::_calc_output_vol(const Vector3 &source_dir, real_t tig
real_t volumes[7];
spcap.calculate(source_dir, tightness, speaker_count, volumes);

#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wmaybe-uninitialized"

switch (AudioServer::get_singleton()->get_speaker_mode()) {
case AudioServer::SPEAKER_SURROUND_71:
output.vol[3].l = volumes[5]; // side-left
Expand All @@ -141,6 +144,8 @@ void AudioStreamPlayer3D::_calc_output_vol(const Vector3 &source_dir, real_t tig
output.vol[0].r = volumes[1]; // front-right
output.vol[0].l = volumes[0]; // front-left
}

#pragma GCC diagnostic pop
}

void AudioStreamPlayer3D::_mix_audio() {
Expand Down

0 comments on commit 05f19a0

Please sign in to comment.