forked from len0rd/rockbox
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
This commit is contained in:
parent
a430e275dd
commit
5b23c9eb0a
4 changed files with 92 additions and 20 deletions
|
@ -63,8 +63,29 @@ int mmsupp_sprintf(char *buf, const char *fmt, ... );
|
|||
|
||||
extern const struct plugin_api * rb;
|
||||
|
||||
#ifdef SIMULATOR
|
||||
|
||||
#define SAMPLE_RATE SAMPR_44 /* 44100 */
|
||||
#define SAMPLE_RATE SAMPR_44 /* Required by Simulator */
|
||||
|
||||
#elif ((CONFIG_PLATFORM & PLATFORM_HOSTED) || defined(CPU_MIPS))
|
||||
|
||||
#define SAMPLE_RATE SAMPR_44 /* All MIPS and hosted targets are fast */
|
||||
|
||||
#elif defined(CPU_ARM)
|
||||
|
||||
/* Treat ARMv5+ as fast */
|
||||
#if (ARM_ARCH >= 5)
|
||||
#define SAMPLE_RATE SAMPR_44
|
||||
#else
|
||||
#define SAMPLE_RATE SAMPR_MIN_GE_22
|
||||
#endif
|
||||
|
||||
#else /* !CPU_ARM */
|
||||
|
||||
/* Treat everyone else as slow */
|
||||
#define SAMPLE_RATE HW_SAMPR_MIN_GE_22
|
||||
|
||||
#endif /* !SIMULATOR */
|
||||
|
||||
#define BUF_SIZE 4096*8
|
||||
#define NBUF 2
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue