Skip to content

Commit

Permalink
Reformat and add comment for "voice volume set to 0" mode
Browse files Browse the repository at this point in the history
  • Loading branch information
drojf committed Feb 22, 2025
1 parent f19ae4a commit c7fa44f
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions Assets.Scripts.Core.Audio/AudioController.cs
Original file line number Diff line number Diff line change
Expand Up @@ -545,8 +545,15 @@ public void MODOnlyRecompile()

public void MODPlayVoiceLS(string filename, int channel, float volume, int character)
{
if(VoiceVolume <= 0f) return;

// If voice volume set to 0, skip executing MODPlayVoiceLS(...) altogether.
// This ensures that, for users who have voices "turned off":
// - No unecessary delays waiting for voices to play out in Auto Mode
// - Lipsync is automatically disabled when voice volume is 0
if (VoiceVolume <= 0f)
{
return;
}

MODTextController.MODCurrentVoiceLayerDetect = channel;
AudioLayerUnity audio = channelDictionary[GetChannelByTypeChannel(AudioType.Voice, channel)];
if (currentAudio[AudioType.Voice].ContainsKey(channel))
Expand Down

0 comments on commit c7fa44f

Please sign in to comment.