mirror of
https://github.com/RPCSX/rpcsx.git
synced 2026-04-05 06:26:49 +00:00
Add setting for master volume
This commit is contained in:
parent
6829fa0286
commit
56ea45f9d5
2 changed files with 5 additions and 2 deletions
|
|
@ -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 });
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue