mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-01-29 00:33:01 +00:00
Add setting for master volume
This commit is contained in:
parent
6829fa0286
commit
56ea45f9d5
@ -478,11 +478,11 @@ error_code cellAudioPortOpen(vm::ptr<CellAudioPortParam> audioParam, vm::ptr<u32
|
||||
|
||||
if (attr & CELL_AUDIO_PORTATTR_INITLEVEL)
|
||||
{
|
||||
port->level = audioParam->level;
|
||||
port->level = audioParam->level * g_cfg.audio.volume / 100.0f;
|
||||
}
|
||||
else
|
||||
{
|
||||
port->level = 1.0f;
|
||||
port->level = g_cfg.audio.volume / 100.0f;
|
||||
}
|
||||
|
||||
port->level_set.store({ port->level, 0.0f });
|
||||
@ -697,6 +697,8 @@ error_code cellAudioSetPortLevel(u32 portNum, float level)
|
||||
return CELL_AUDIO_ERROR_PORT_NOT_OPEN;
|
||||
}
|
||||
|
||||
level *= g_cfg.audio.volume / 100.0f;
|
||||
|
||||
if (level >= 0.0f)
|
||||
{
|
||||
port.level_set.exchange({ level, (port.level - level) / 624.0f });
|
||||
|
@ -508,6 +508,7 @@ struct cfg_root : cfg::node
|
||||
cfg::_bool downmix_to_2ch{this, "Downmix to Stereo", true};
|
||||
cfg::_int<2, 128> frames{this, "Buffer Count", 32};
|
||||
cfg::_int<1, 128> startt{this, "Start Threshold", 1};
|
||||
cfg::_int<0, 200> volume{this, "Master Volume", 100};
|
||||
|
||||
} audio{this};
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user