launcher: Raise DualSense speaker volume range for SpeakerFX (#1043)

controller: restore speaker midpoint and raise volume ceiling
This commit is contained in:
Pyxellator
2026-10-04 17:48:25 +02:00
committed by GitHub
parent c885da0a3f
commit 719e02574a
7 changed files with 40 additions and 18 deletions
+1 -1
View File
@@ -48,7 +48,7 @@ struct ConfigOptions {
int32_t user_id = DEFAULT_USER_ID;
std::string audio_input_device;
std::optional<ControllerColor> controller_color;
uint32_t controller_speaker_volume = 100;
uint32_t controller_speaker_volume = 50;
uint32_t controller_vibration_intensity = 100;
PresentMode present_mode = PresentMode::Mailbox;
int32_t gpu_index = -1;
@@ -359,16 +359,16 @@
<layout class="QHBoxLayout" name="controllerVolumeLayout">
<item>
<widget class="QSlider" name="slider_controller_volume">
<property name="toolTip"><string>Scale the DualSense controller speaker over USB and Bluetooth</string></property>
<property name="toolTip"><string>Scale the DualSense speaker over USB and Bluetooth. 50% is the previous default; 100% adds 6 dB of gain.</string></property>
<property name="maximum"><number>100</number></property>
<property name="value"><number>100</number></property>
<property name="value"><number>50</number></property>
<property name="orientation"><enum>Qt::Horizontal</enum></property>
</widget>
</item>
<item>
<widget class="QLabel" name="label_controller_volume_value">
<property name="minimumSize"><size><width>40</width><height>0</height></size></property>
<property name="text"><string>100%</string></property>
<property name="text"><string>50%</string></property>
</widget>
</item>
</layout>
+6 -6
View File
@@ -48,7 +48,7 @@ QString EnumToText(T value) {
struct ControllerSettings {
QString color;
int speaker_volume = 100;
int speaker_volume = 50;
int vibration_intensity = 100;
void WriteSettings(QSettings* s) const {
@@ -60,13 +60,13 @@ struct ControllerSettings {
void ReadSettings(QSettings* s) {
const QColor saved_color(s->value("controller_color").toString());
color = saved_color.isValid() ? saved_color.name(QColor::HexRgb) : QString {};
const auto read_percent = [s](const char* key) {
const auto read_percent = [s](const char* key, int fallback) {
bool ok = false;
const int value = s->value(key, 100).toInt(&ok);
return ok ? qBound(0, value, 100) : 100;
const int value = s->value(key, fallback).toInt(&ok);
return ok ? qBound(0, value, 100) : fallback;
};
speaker_volume = read_percent("controller_speaker_volume");
vibration_intensity = read_percent("controller_vibration_intensity");
speaker_volume = read_percent("controller_speaker_volume", 50);
vibration_intensity = read_percent("controller_vibration_intensity", 100);
}
};
+3 -1
View File
@@ -224,7 +224,9 @@ void GameController::CycleSetting(Setting setting) {
float GameController::GetSettingScale(Setting setting) const {
const auto step = m_setting_steps[static_cast<size_t>(setting)].load(std::memory_order_relaxed);
if (setting == Setting::SpeakerVolume) {
return SPEAKER_VOLUME[step] * (Config::GetControllerSpeakerVolume() / 100.0f);
// The old speaker level matches the PS5 slider's midpoint. Give the upper
// half of the global slider up to 6 dB of extra software gain.
return SPEAKER_VOLUME[step] * (Config::GetControllerSpeakerVolume() / 50.0f);
}
if (setting == Setting::VibrationIntensity) {
return INTENSITY[step] * (Config::GetControllerVibrationIntensity() / 100.0f);
+1 -1
View File
@@ -54,7 +54,7 @@ static void PrintUsage() {
Config::DEFAULT_USER_ID);
::printf(" --mic <name> Capture from this microphone; omit for silence.\n");
::printf(" --controller-color <#RRGGBB> Override the controller lightbar color.\n");
::printf(" --controller-volume <0-100> DualSense speaker volume. Default: 100.\n");
::printf(" --controller-volume <0-100> DualSense speaker volume. Default: 50.\n");
::printf(" --controller-vibration <0-100> DualSense vibration intensity. Default: 100.\n");
::printf(
" --present-mode <value> Fifo, Mailbox, or Immediate. Default: Mailbox.\n");