summaryrefslogtreecommitdiffstats
path: root/apps/plugins/sdl
diff options
context:
space:
mode:
authorSolomon Peachy <pizza@shaftnet.org>2019-08-07 17:16:48 -0400
committerSolomon Peachy <pizza@shaftnet.org>2019-08-08 22:37:30 +0200
commit5b23c9eb0a97534f0d0fc3aa0c1ad302199eb8dc (patch)
tree7151fdb71b085b9a43113832c0d478b84bfbbf49 /apps/plugins/sdl
parenta430e275dddab24059ba15d2621e518562392540 (diff)
downloadrockbox-5b23c9eb0a97534f0d0fc3aa0c1ad302199eb8dc.tar.gz
rockbox-5b23c9eb0a97534f0d0fc3aa0c1ad302199eb8dc.tar.bz2
rockbox-5b23c9eb0a97534f0d0fc3aa0c1ad302199eb8dc.zip
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
Diffstat (limited to 'apps/plugins/sdl')
-rw-r--r--apps/plugins/sdl/include/SDL_config_rockbox.h6
1 files changed, 1 insertions, 5 deletions
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) */