Index: apps/plugins/midi/midiutil.h =================================================================== --- apps/plugins/midi/midiutil.h (Revision 30427) +++ apps/plugins/midi/midiutil.h (Arbeitskopie) @@ -26,30 +26,24 @@ #define BUF_SIZE 16384 /* 64 kB output buffers */ #define NBUF 2 +#define SAMPLE_RATE SAMPR_44 /* Always use 44.1 kHz to avoid aliasing effects */ + #ifndef SIMULATOR -#if (HW_SAMPR_CAPS & SAMPR_CAP_22) /* use 22050Hz if we can */ -#define SAMPLE_RATE SAMPR_22 /* 22050 */ -#else -#define SAMPLE_RATE SAMPR_44 /* 44100 */ -#endif + #ifdef CPU_PP + /* PP based targets can't handle the full amount of voices */ + #define MAX_VOICES 20 + #elif (CONFIG_PLATFORM & PLATFORM_HOSTED) + #define MAX_VOICES 48 + #else + #define MAX_VOICES 24 /* Note: 24 midi channels is the minimum general midi spec implementation */ + #endif -/* Some of the pp based targets can't handle too many voices - mainly because they have to use 44100Hz sample rate, this could be - improved to increase MAX_VOICES for targets that can do 22kHz */ -#ifdef CPU_PP -#define MAX_VOICES 16 -#elif (CONFIG_PLATFORM & PLATFORM_HOSTED) -#define MAX_VOICES 48 #else -#define MAX_VOICES 24 /* Note: 24 midi channels is the minimum general midi spec implementation */ -#endif /* CPU_PP */ + + /* In sumulator we can afford to use more voices */ + #define MAX_VOICES 48 -#else /* Simulator requires 44100Hz, and we can afford to use more voices */ - -#define SAMPLE_RATE SAMPR_44 -#define MAX_VOICES 48 - #endif #define BYTE unsigned char