Let's actually take volume into account this time.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@6732 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
parent
17f6d65da5
commit
a4a1a5523b
1 changed files with 2 additions and 2 deletions
|
@ -96,8 +96,8 @@ int uda1380_setvol(int vol)
|
||||||
|
|
||||||
uda1380_volume = vol;
|
uda1380_volume = vol;
|
||||||
/* Simple linear volume crossfade curves */
|
/* Simple linear volume crossfade curves */
|
||||||
vol_l = MAX(uda1380_balance*0xff/100, 0);
|
vol_l = MAX(uda1380_balance*(255 - vol)/100 + vol, vol);
|
||||||
vol_r = MAX(-uda1380_balance*0xff/100, 0);
|
vol_r = MAX(-uda1380_balance*(255 - vol)/100 + vol, vol);
|
||||||
return uda1380_write_reg(REG_MASTER_VOL,
|
return uda1380_write_reg(REG_MASTER_VOL,
|
||||||
MASTER_VOL_LEFT(vol_l) | MASTER_VOL_RIGHT(vol_r));
|
MASTER_VOL_LEFT(vol_l) | MASTER_VOL_RIGHT(vol_r));
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue