From 2f1c528a6c37558760b28638d271f5ff9ba45e4f Mon Sep 17 00:00:00 2001 From: notaz Date: Tue, 6 Sep 2011 20:18:34 +0300 Subject: 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. --- common.h | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'common.h') diff --git a/common.h b/common.h index 7eea8b6..da22d2e 100644 --- a/common.h +++ b/common.h @@ -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) \ -- cgit v1.2.3