diff options
author | notaz | 2011-09-06 20:18:34 +0300 |
---|---|---|
committer | notaz | 2011-09-08 00:48:33 +0300 |
commit | 2f1c528a6c37558760b28638d271f5ff9ba45e4f (patch) | |
tree | cf0efc8e28469726fd231e54f8655ae94ecdc891 /common.h | |
parent | a231964c3570be4cf3d2efd023090b6a9e730935 (diff) | |
download | picogpsp-2f1c528a6c37558760b28638d271f5ff9ba45e4f.tar.gz picogpsp-2f1c528a6c37558760b28638d271f5ff9ba45e4f.tar.bz2 picogpsp-2f1c528a6c37558760b28638d271f5ff9ba45e4f.zip |
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.
Diffstat (limited to 'common.h')
-rw-r--r-- | common.h | 7 |
1 files changed, 7 insertions, 0 deletions
@@ -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) \ |