diff options
| author | Dave Chapman <dave@dchapman.com> | 2007-07-24 08:22:14 +0000 |
|---|---|---|
| committer | Dave Chapman <dave@dchapman.com> | 2007-07-24 08:22:14 +0000 |
| commit | a6b4842cc36c0a3802f73ab010e449f7ddf4415c (patch) | |
| tree | d4d1ad9dd13939900d893e007b29ad58f38fc81d /apps/plugins | |
| parent | b97c00dc8e1b26cd7982db31ff1dc80f54c4b977 (diff) | |
| download | rockbox-a6b4842cc36c0a3802f73ab010e449f7ddf4415c.zip rockbox-a6b4842cc36c0a3802f73ab010e449f7ddf4415c.tar.gz rockbox-a6b4842cc36c0a3802f73ab010e449f7ddf4415c.tar.bz2 rockbox-a6b4842cc36c0a3802f73ab010e449f7ddf4415c.tar.xz | |
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
Diffstat (limited to 'apps/plugins')
| -rw-r--r-- | apps/plugins/midiplay.c | 19 |
1 files changed, 14 insertions, 5 deletions
diff --git a/apps/plugins/midiplay.c b/apps/plugins/midiplay.c index 9dda074..6dc1188 100644 --- a/apps/plugins/midiplay.c +++ b/apps/plugins/midiplay.c @@ -80,12 +80,21 @@ PLUGIN_IRAM_DECLARE #define FRACTSIZE 10 #ifndef SIMULATOR - #define SAMPLE_RATE SAMPR_22 // 44100 22050 11025 - #define MAX_VOICES 20 // Note: 24 midi channels is the minimum general midi - // spec implementation + +#if (HW_SAMPR_CAPS & SAMPR_CAP_22) +#define SAMPLE_RATE SAMPR_22 // 44100 22050 11025 +#else +#define SAMPLE_RATE SAMPR_44 // 44100 22050 11025 +#endif + +#define MAX_VOICES 20 // Note: 24 midi channels is the minimum general midi + // spec implementation + #else // Simulator requires 44100, and we can afford to use more voices - #define SAMPLE_RATE SAMPR_44 - #define MAX_VOICES 48 + +#define SAMPLE_RATE SAMPR_44 +#define MAX_VOICES 48 + #endif |