From 5b23c9eb0a97534f0d0fc3aa0c1ad302199eb8dc Mon Sep 17 00:00:00 2001 From: Solomon Peachy Date: Wed, 7 Aug 2019 17:16:48 -0400 Subject: Introduce HW_SAMPR_MIN_GE_22 macro Gives us the lowest HW sample rate that's >= 22KHz. Needed because some targets that don't support 22K support 11K or 8K, so HW_SAMPR_MIN will give us much lower quality than is acceptable. Take advantage of this new macro in the SDL, MIDI, and MIKMOD plugins, and implement a crude "fast enough" test to enable higher sample rates on more capable targets. Change-Id: I6ad38026fb3410c62da028e78512e027729bb851 --- apps/plugins/sdl/include/SDL_config_rockbox.h | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) (limited to 'apps/plugins/sdl') diff --git a/apps/plugins/sdl/include/SDL_config_rockbox.h b/apps/plugins/sdl/include/SDL_config_rockbox.h index 40bd7fe177..91183ebf88 100644 --- a/apps/plugins/sdl/include/SDL_config_rockbox.h +++ b/apps/plugins/sdl/include/SDL_config_rockbox.h @@ -47,11 +47,7 @@ #ifdef SIMULATOR #define RB_SAMPR SAMPR_44 #else -#if HW_SAMPR_CAPS & SAMPR_CAP_22 -#define RB_SAMPR SAMPR_22 -#else -#define RB_SAMPR HW_SAMPR_MIN -#endif +#define RB_SAMPR HW_SAMPR_MIN_GE_22 /* Min HW rate at least 22KHz */ #endif /* Enable the stub cdrom driver (src/cdrom/dummy/\*.c) */ -- cgit v1.2.3