mirror of
https://github.com/KartKrewDev/RingRacers.git
synced 2025-10-30 08:01:28 +00:00
Include voice in tabbed out audio settings (fixes #37)
This commit is contained in:
parent
daa6dbd667
commit
e134b6609f
4 changed files with 14 additions and 4 deletions
|
|
@ -420,7 +420,11 @@ consvar_t cv_bgaudio = Player("bgaudio", "Nothing").onchange_noinit(BGAudio_OnCh
|
||||||
{0, "Nothing"},
|
{0, "Nothing"},
|
||||||
{1, "Music"},
|
{1, "Music"},
|
||||||
{2, "Sounds"},
|
{2, "Sounds"},
|
||||||
|
{4, "Voices"},
|
||||||
{3, "Music&Sounds"},
|
{3, "Music&Sounds"},
|
||||||
|
{5, "Music&Voices"},
|
||||||
|
{6, "Sounds&Voices"},
|
||||||
|
{7, "MusicSounds&Voices"}
|
||||||
});
|
});
|
||||||
|
|
||||||
// Pause game upon window losing focus
|
// Pause game upon window losing focus
|
||||||
|
|
|
||||||
|
|
@ -5395,7 +5395,7 @@ static void PT_HandleVoiceClient(SINT8 node, boolean isserver)
|
||||||
{
|
{
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
if (cv_voice_selfdeafen.value != 1 && playernum != g_localplayers[0])
|
if (cv_voice_selfdeafen.value != 1 && playernum != g_localplayers[0] && !g_voice_disabled)
|
||||||
{
|
{
|
||||||
S_QueueVoiceFrameFromPlayer(playernum, (void*)decoded_out, decoded_samples * sizeof(float), false);
|
S_QueueVoiceFrameFromPlayer(playernum, (void*)decoded_out, decoded_samples * sizeof(float), false);
|
||||||
}
|
}
|
||||||
|
|
@ -5409,7 +5409,7 @@ static void PT_HandleVoiceClient(SINT8 node, boolean isserver)
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (cv_voice_selfdeafen.value != 1 && playernum != g_localplayers[0])
|
if (cv_voice_selfdeafen.value != 1 && playernum != g_localplayers[0] && !g_voice_disabled)
|
||||||
{
|
{
|
||||||
S_QueueVoiceFrameFromPlayer(playernum, (void*)decoded_out, decoded_samples * sizeof(float), terminal);
|
S_QueueVoiceFrameFromPlayer(playernum, (void*)decoded_out, decoded_samples * sizeof(float), terminal);
|
||||||
}
|
}
|
||||||
|
|
@ -7679,7 +7679,7 @@ void NetVoiceUpdate(void)
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (cv_voice_selfdeafen.value == 1)
|
if (cv_voice_selfdeafen.value == 1 || g_voice_disabled)
|
||||||
{
|
{
|
||||||
g_local_voice_buffer_len = 0;
|
g_local_voice_buffer_len = 0;
|
||||||
continue;
|
continue;
|
||||||
|
|
|
||||||
|
|
@ -2858,6 +2858,9 @@ void BGAudio_OnChange(void)
|
||||||
|
|
||||||
if (window_notinfocus && !(cv_bgaudio.value & 2))
|
if (window_notinfocus && !(cv_bgaudio.value & 2))
|
||||||
S_StopSounds();
|
S_StopSounds();
|
||||||
|
|
||||||
|
if (window_notinfocus && !(cv_bgaudio.value & 4))
|
||||||
|
g_voice_disabled = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -2889,7 +2892,7 @@ void S_QueueVoiceFrameFromPlayer(INT32 playernum, void *data, UINT32 len, boolea
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (cv_voice_selfdeafen.value != 1)
|
if (cv_voice_selfdeafen.value != 1 && !g_voice_disabled)
|
||||||
{
|
{
|
||||||
I_QueueVoiceFrameFromPlayer(playernum, data, len, terminal);
|
I_QueueVoiceFrameFromPlayer(playernum, data, len, terminal);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -523,6 +523,7 @@ static void Impl_HandleWindowEvent(SDL_WindowEvent evt)
|
||||||
window_notinfocus = false;
|
window_notinfocus = false;
|
||||||
|
|
||||||
S_SetMusicVolume();
|
S_SetMusicVolume();
|
||||||
|
g_voice_disabled = cv_voice_selfdeafen.value;
|
||||||
|
|
||||||
if (!firsttimeonmouse)
|
if (!firsttimeonmouse)
|
||||||
{
|
{
|
||||||
|
|
@ -537,6 +538,8 @@ static void Impl_HandleWindowEvent(SDL_WindowEvent evt)
|
||||||
I_SetMusicVolume(0);
|
I_SetMusicVolume(0);
|
||||||
if (!(cv_bgaudio.value & 2))
|
if (!(cv_bgaudio.value & 2))
|
||||||
S_StopSounds();
|
S_StopSounds();
|
||||||
|
if (!(cv_bgaudio.value & 4))
|
||||||
|
g_voice_disabled = true;
|
||||||
|
|
||||||
G_ResetAllDeviceGameKeyDown();
|
G_ResetAllDeviceGameKeyDown();
|
||||||
G_ResetAllDeviceResponding();
|
G_ResetAllDeviceResponding();
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue