Qt: Save audio output latency value separately to minimal flag
This commit is contained in:
@@ -4873,19 +4873,8 @@ void FullscreenUI::DrawAudioSettingsPage()
|
||||
DrawIntRangeSetting(bsi, FSUI_CSTR("Buffer Size"),
|
||||
FSUI_CSTR("Determines the amount of audio buffered before being pulled by the host API."),
|
||||
"Audio", "BufferMS", AudioStreamParameters::DEFAULT_BUFFER_MS, 10, 500, FSUI_CSTR("%d ms"));
|
||||
|
||||
const u32 output_latency =
|
||||
GetEffectiveUIntSetting(bsi, "Audio", "OutputLatencyMS", AudioStreamParameters::DEFAULT_OUTPUT_LATENCY_MS);
|
||||
bool output_latency_minimal = (output_latency == 0);
|
||||
if (ToggleButton(FSUI_CSTR("Minimal Output Latency"),
|
||||
FSUI_CSTR("When enabled, the minimum supported output latency will be used for the host API."),
|
||||
&output_latency_minimal))
|
||||
{
|
||||
bsi->SetUIntValue("Audio", "OutputLatencyMS",
|
||||
output_latency_minimal ? 0 : AudioStreamParameters::DEFAULT_OUTPUT_LATENCY_MS);
|
||||
SetSettingsChanged(bsi);
|
||||
}
|
||||
if (!output_latency_minimal)
|
||||
if (!GetEffectiveBoolSetting(bsi, "Audio", "OutputLatencyMinimal",
|
||||
AudioStreamParameters::DEFAULT_OUTPUT_LATENCY_MINIMAL))
|
||||
{
|
||||
DrawIntRangeSetting(
|
||||
bsi, FSUI_CSTR("Output Latency"),
|
||||
@@ -4893,6 +4882,9 @@ void FullscreenUI::DrawAudioSettingsPage()
|
||||
"played through speakers."),
|
||||
"Audio", "OutputLatencyMS", AudioStreamParameters::DEFAULT_OUTPUT_LATENCY_MS, 1, 500, FSUI_CSTR("%d ms"));
|
||||
}
|
||||
DrawToggleSetting(bsi, FSUI_CSTR("Minimal Output Latency"),
|
||||
FSUI_CSTR("When enabled, the minimum supported output latency will be used for the host API."),
|
||||
"Audio", "OutputLatencyMinimal", AudioStreamParameters::DEFAULT_OUTPUT_LATENCY_MINIMAL);
|
||||
|
||||
EndMenuButtons();
|
||||
}
|
||||
|
||||
@@ -431,10 +431,11 @@ void SPU::Initialize()
|
||||
void SPU::CreateOutputStream()
|
||||
{
|
||||
Log_InfoFmt(
|
||||
"Creating '{}' audio stream, sample rate = {}, expansion = {}, buffer = {}, latency = {}, stretching = {}",
|
||||
"Creating '{}' audio stream, sample rate = {}, expansion = {}, buffer = {}, latency = {}{}, stretching = {}",
|
||||
AudioStream::GetBackendName(g_settings.audio_backend), static_cast<u32>(SAMPLE_RATE),
|
||||
AudioStream::GetExpansionModeName(g_settings.audio_stream_parameters.expansion_mode),
|
||||
g_settings.audio_stream_parameters.buffer_ms, g_settings.audio_stream_parameters.output_latency_ms,
|
||||
g_settings.audio_stream_parameters.output_latency_minimal ? " (or minimal)" : "",
|
||||
AudioStream::GetStretchModeName(g_settings.audio_stream_parameters.stretch_mode));
|
||||
|
||||
Error error;
|
||||
|
||||
Reference in New Issue
Block a user