summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDave Chapman <dave@dchapman.com>2007-07-24 08:22:14 +0000
committerDave Chapman <dave@dchapman.com>2007-07-24 08:22:14 +0000
commita6b4842cc36c0a3802f73ab010e449f7ddf4415c (patch)
treed4d1ad9dd13939900d893e007b29ad58f38fc81d
parentb97c00dc8e1b26cd7982db31ff1dc80f54c4b977 (diff)
downloadrockbox-a6b4842cc36c0a3802f73ab010e449f7ddf4415c.tar.gz
rockbox-a6b4842cc36c0a3802f73ab010e449f7ddf4415c.zip
Check if the HW is capable of 22.050KHz playback, and revert to using 44.1Khz otherwise.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@13969 a1c6a512-1295-4272-9138-f99709370657
-rw-r--r--apps/plugins/midiplay.c19
1 files changed, 14 insertions, 5 deletions
diff --git a/apps/plugins/midiplay.c b/apps/plugins/midiplay.c
index 9dda07482e..6dc11888d4 100644
--- a/apps/plugins/midiplay.c
+++ b/apps/plugins/midiplay.c
@@ -80,12 +80,21 @@ PLUGIN_IRAM_DECLARE
80#define FRACTSIZE 10 80#define FRACTSIZE 10
81 81
82#ifndef SIMULATOR 82#ifndef SIMULATOR
83 #define SAMPLE_RATE SAMPR_22 // 44100 22050 11025 83
84 #define MAX_VOICES 20 // Note: 24 midi channels is the minimum general midi 84#if (HW_SAMPR_CAPS & SAMPR_CAP_22)
85 // spec implementation 85#define SAMPLE_RATE SAMPR_22 // 44100 22050 11025
86#else
87#define SAMPLE_RATE SAMPR_44 // 44100 22050 11025
88#endif
89
90#define MAX_VOICES 20 // Note: 24 midi channels is the minimum general midi
91 // spec implementation
92
86#else // Simulator requires 44100, and we can afford to use more voices 93#else // Simulator requires 44100, and we can afford to use more voices
87 #define SAMPLE_RATE SAMPR_44 94
88 #define MAX_VOICES 48 95#define SAMPLE_RATE SAMPR_44
96#define MAX_VOICES 48
97
89#endif 98#endif
90 99
91 100