From 9f6ce046cb25524693a8fd1bd5c4bd22ac687750 Mon Sep 17 00:00:00 2001 From: Franklin Wei Date: Mon, 25 Dec 2017 14:53:11 -0500 Subject: duke3d: rewrite sound mixing to use fixed-point Gives significant performance improvement on ipod6g. Change-Id: I1e8462bec197acb10e770c796240b5001df52440 --- apps/plugins/sdl/include/SDL_config_rockbox.h | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'apps/plugins/sdl/include') diff --git a/apps/plugins/sdl/include/SDL_config_rockbox.h b/apps/plugins/sdl/include/SDL_config_rockbox.h index 42801e4..da8d8c2 100644 --- a/apps/plugins/sdl/include/SDL_config_rockbox.h +++ b/apps/plugins/sdl/include/SDL_config_rockbox.h @@ -195,4 +195,17 @@ void fatal(char *fmt, ...); void rb_exit(int rc); void rbsdl_atexit(void (*)(void)); +/* speed */ +static inline uint16_t readLE16(void *addr) +{ + uint8_t *ptr = addr; + return (*(ptr+1) << 8) | *ptr; +} + +static inline uint32_t readLE32(void *addr) +{ + uint8_t *ptr = addr; + return (*(ptr+3) << 24) |(*(ptr+2) << 16) | (*(ptr+1) << 8) | *ptr; +} + #endif /* _SDL_config_rockbox_h */ -- cgit v1.1