Add 16kHz sample rate and fix 91kHz CB label. (#2092)

Add 16 kHz sample rate and sundry.

This commit implements the change suggested in #2091 adding 16 kHz
audio sample rate (the default rate remains 44.1 kHz).

This commit also changes the 96.1 kHz rate to 96 kHz, which is more
commonly used, and fixes the unmatched combobox label 91000.
presentation
step 6 years ago committed by GitHub
parent f501284b66
commit e2a0f1d871
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 20
      src/gui/dialog/SettingsDialog.cpp
  2. 3
      ui/settings.glade

@ -391,15 +391,18 @@ void SettingsDialog::load() {
}
switch (static_cast<int>(settings->getAudioSampleRate())) {
case 96100:
gtk_combo_box_set_active(GTK_COMBO_BOX(get("cbAudioSampleRate")), 1);
case 16000:
gtk_combo_box_set_active(GTK_COMBO_BOX(get("cbAudioSampleRate")), 0);
break;
case 192000:
case 96000:
gtk_combo_box_set_active(GTK_COMBO_BOX(get("cbAudioSampleRate")), 2);
break;
case 192000:
gtk_combo_box_set_active(GTK_COMBO_BOX(get("cbAudioSampleRate")), 3);
break;
case 44100:
default:
gtk_combo_box_set_active(GTK_COMBO_BOX(get("cbAudioSampleRate")), 0);
gtk_combo_box_set_active(GTK_COMBO_BOX(get("cbAudioSampleRate")), 1);
break;
}
@ -615,13 +618,16 @@ void SettingsDialog::save() {
}
switch (gtk_combo_box_get_active(GTK_COMBO_BOX(get("cbAudioSampleRate")))) {
case 1:
settings->setAudioSampleRate(96100.0);
case 0:
settings->setAudioSampleRate(16000.0);
break;
case 2:
settings->setAudioSampleRate(96000.0);
break;
case 3:
settings->setAudioSampleRate(192000.0);
break;
case 0:
case 1:
default:
settings->setAudioSampleRate(44100.0);
break;

@ -4243,8 +4243,9 @@ If available select &lt;small&gt;&lt;tt&gt;pulse&lt;/tt&gt;&lt;/small&gt; as inp
<property name="can_focus">False</property>
<property name="active">0</property>
<items>
<item id="16000">16000 Hz</item>
<item id="44100">44100 Hz</item>
<item id="91000">91000 Hz</item>
<item id="96000">96000 Hz</item>
<item id="192000">192000 Hz</item>
</items>
</object>

Loading…
Cancel
Save