mirror of
https://github.com/RaySollium99/picodrive.git
synced 2025-09-05 15:27:46 -04:00
sound, increase output level a bit
This commit is contained in:
parent
cce32a34da
commit
a5a230e0d8
2 changed files with 3 additions and 3 deletions
|
@ -14,7 +14,7 @@
|
||||||
|
|
||||||
/* limitter */
|
/* limitter */
|
||||||
#define Limit16(val) \
|
#define Limit16(val) \
|
||||||
val -= val >> 2; /* reduce level to avoid clipping */ \
|
val -= val >> 3; /* reduce level to avoid clipping */ \
|
||||||
if ((short)val != val) val = (val < 0 ? MINOUT : MAXOUT)
|
if ((short)val != val) val = (val < 0 ? MINOUT : MAXOUT)
|
||||||
|
|
||||||
int mix_32_to_16l_level;
|
int mix_32_to_16l_level;
|
||||||
|
|
|
@ -156,7 +156,7 @@ m16_32_s2_no_unal2:
|
||||||
@ limit
|
@ limit
|
||||||
@ reg=int_sample, r12=1, r8=tmp, kills flags
|
@ reg=int_sample, r12=1, r8=tmp, kills flags
|
||||||
.macro Limit reg
|
.macro Limit reg
|
||||||
sub \reg, \reg, \reg, asr #2 @ reduce audio lvl some to avoid clipping
|
sub \reg, \reg, \reg, asr #3 @ reduce audio lvl some to avoid clipping
|
||||||
add r8, r12, \reg, asr #15
|
add r8, r12, \reg, asr #15
|
||||||
bics r8, r8, #1 @ in non-overflow conditions r8 is 0 or 1
|
bics r8, r8, #1 @ in non-overflow conditions r8 is 0 or 1
|
||||||
movne \reg, #0x8000
|
movne \reg, #0x8000
|
||||||
|
@ -166,7 +166,7 @@ m16_32_s2_no_unal2:
|
||||||
@ limit and shift up by 16
|
@ limit and shift up by 16
|
||||||
@ reg=int_sample, r12=1, r8=tmp, kills flags
|
@ reg=int_sample, r12=1, r8=tmp, kills flags
|
||||||
.macro Limitsh reg
|
.macro Limitsh reg
|
||||||
sub \reg, \reg, \reg, asr #2 @ reduce audio lvl some to avoid clipping
|
sub \reg, \reg, \reg, asr #3 @ reduce audio lvl some to avoid clipping
|
||||||
add r8, r12,\reg, asr #15
|
add r8, r12,\reg, asr #15
|
||||||
bics r8, r8, #1 @ in non-overflow conditions r8 is 0 or 1
|
bics r8, r8, #1 @ in non-overflow conditions r8 is 0 or 1
|
||||||
moveq \reg, \reg, lsl #16
|
moveq \reg, \reg, lsl #16
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue