Qt: Add label next to audio buffer size

This commit is contained in:
JordanTheToaster 2024-05-06 12:23:28 +01:00 committed by Connor McLaughlin
parent f67611cbe6
commit 3114332c89
2 changed files with 39 additions and 27 deletions

View File

@ -255,6 +255,7 @@ void AudioSettingsWidget::updateLatencyLabel()
//: Preserve the %1 variable, adapt the latter ms (and/or any possible spaces in between) to your language's ruleset.
m_ui.outputLatencyLabel->setText(minimal_output ? tr("N/A") : tr("%1 ms").arg(config_output_latency_ms));
m_ui.bufferMSLabel->setText(tr("%1 ms").arg(config_buffer_ms));
const u32 output_latency_ms = minimal_output ? AudioStream::GetMSForBufferSize(SPU2::SAMPLE_RATE, m_output_device_latency) : config_output_latency_ms;
if (output_latency_ms > 0)

View File

@ -7,7 +7,7 @@
<x>0</x>
<y>0</y>
<width>523</width>
<height>478</height>
<height>504</height>
</rect>
</property>
<layout class="QVBoxLayout" name="verticalLayout">
@ -57,6 +57,8 @@
</layout>
</item>
<item row="5" column="1">
<layout class="QHBoxLayout" name="horizontalLayout_4" stretch="1,0">
<item>
<widget class="QSlider" name="bufferMS">
<property name="minimum">
<number>15</number>
@ -74,7 +76,7 @@
<number>50</number>
</property>
<property name="orientation">
<enum>Qt::Orientation::Horizontal</enum>
<enum>Qt::Horizontal</enum>
</property>
<property name="tickPosition">
<enum>QSlider::TickPosition::TicksBothSides</enum>
@ -84,6 +86,15 @@
</property>
</widget>
</item>
<item>
<widget class="QLabel" name="bufferMSLabel">
<property name="text">
<string>0 ms</string>
</property>
</widget>
</item>
</layout>
</item>
<item row="4" column="1">
<layout class="QHBoxLayout" name="horizontalLayout_6" stretch="0,0">
<item>