mirror of
https://github.com/Rockbox/rockbox.git
synced 2025-11-09 13:12:37 -05:00
Higher bitdepth software volume scaling
Operates between 0 and -74 dB (mute) without issue Change-Id: I497e002bd8db43833a09ebbc29212fbb6cc8ebfd
This commit is contained in:
parent
16b0098256
commit
56b0dde545
5 changed files with 118 additions and 32 deletions
|
|
@ -70,10 +70,14 @@ void audiohw_set_volume(int vol_l, int vol_r)
|
|||
}
|
||||
#endif
|
||||
|
||||
l = l <= PCM5102A_VOLUME_MIN ? PCM_MUTE_LEVEL : l;
|
||||
r = r <= PCM5102A_VOLUME_MIN ? PCM_MUTE_LEVEL : r;
|
||||
|
||||
pcm_set_master_volume(l, r);
|
||||
if (l <= PCM5102A_VOLUME_MIN || r <= PCM5102A_VOLUME_MIN)
|
||||
{
|
||||
pcm_set_master_volume(PCM_MUTE_LEVEL, PCM_MUTE_LEVEL);
|
||||
}
|
||||
else
|
||||
{
|
||||
pcm_set_master_volume(l/20, r/20);
|
||||
}
|
||||
}
|
||||
|
||||
void audiohw_mute_hp(int mute)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue