Skip to content

Commit

Permalink
Merge pull request scp-fs2open#6144 from Goober5000/emp_voice_fix
Browse files Browse the repository at this point in the history
properly distinguish between adjusting voice and effects volume
  • Loading branch information
Goober5000 committed May 16, 2024
2 parents 30d1653 + 724e2e7 commit fd32aba
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
5 changes: 2 additions & 3 deletions code/mission/missionmessage.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,6 @@
#include "sound/fsspeech.h"
#include "species_defs/species_defs.h"
#include "utils/Random.h"
#include "weapon/emp.h"

bool Allow_generic_backup_messages = false;
float Command_announces_enemy_arrival_chance = 0.25;
Expand Down Expand Up @@ -2384,10 +2383,10 @@ void message_maybe_distort()

if ( Message_wave_muted ) {
if ( !was_muted )
snd_set_volume(Playing_messages[i].wave, 0.0f);
snd_set_volume(Playing_messages[i].wave, 0.0f, true);
} else {
if ( was_muted )
snd_set_volume(Playing_messages[i].wave, (Master_sound_volume * aav_voice_volume));
snd_set_volume(Playing_messages[i].wave, (Master_voice_volume * aav_voice_volume), true);
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion code/sound/sound.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1073,7 +1073,7 @@ void snd_set_volume(sound_handle sig, float volume, bool is_voice)
//looping sound volumes are updated in snd_do_frame
if(!isLoopingSound) {
if (is_voice) {
new_volume = volume * (Master_voice_volume * aav_effect_volume);
new_volume = volume * (Master_voice_volume * aav_voice_volume);
} else {
new_volume = volume * (Master_sound_volume * aav_effect_volume);
}
Expand Down

0 comments on commit fd32aba

Please sign in to comment.