tweak sound buffering and timing to better match pandora's refresh.

this also changes how direct sound channels are started and
sample step precision is increased to hopefully fix gbc + direct
channel desync that has been reported on the forums.
This commit is contained in:
notaz
2011-09-06 20:18:34 +03:00
parent a231964c35
commit 2f1c528a6c
4 changed files with 48 additions and 55 deletions

View File

@@ -180,6 +180,7 @@
typedef u32 fixed16_16;
typedef u32 fixed8_24;
#define float_to_fp16_16(value) \
(fixed16_16)((value) * 65536.0) \
@@ -196,6 +197,12 @@ typedef u32 fixed16_16;
#define fp16_16_fractional_part(value) \
((value) & 0xFFFF) \
#define float_to_fp8_24(value) \
(fixed8_24)((value) * 16777216.0) \
#define fp8_24_fractional_part(value) \
((value) & 0xFFFFFF) \
#define fixed_div(numerator, denominator, bits) \
(((numerator * (1 << bits)) + (denominator / 2)) / denominator) \