diff options
Diffstat (limited to 'apps/plugins')
-rw-r--r-- | apps/plugins/pdbox/pdbox.h | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/apps/plugins/pdbox/pdbox.h b/apps/plugins/pdbox/pdbox.h index 2ee32a0dc8..cf46e4835a 100644 --- a/apps/plugins/pdbox/pdbox.h +++ b/apps/plugins/pdbox/pdbox.h | |||
@@ -22,11 +22,8 @@ | |||
22 | #ifndef PDBOX_H | 22 | #ifndef PDBOX_H |
23 | #define PDBOX_H | 23 | #define PDBOX_H |
24 | 24 | ||
25 | |||
26 | #if 1 | ||
27 | /* Use TLSF. */ | 25 | /* Use TLSF. */ |
28 | #include "codecs/lib/tlsf/src/tlsf.h" | 26 | #include "codecs/lib/tlsf/src/tlsf.h" |
29 | #endif | ||
30 | 27 | ||
31 | /* Pure Data */ | 28 | /* Pure Data */ |
32 | #include "PDa/src/m_pd.h" | 29 | #include "PDa/src/m_pd.h" |
@@ -43,7 +40,17 @@ | |||
43 | #define calloc(elements, elem_size) tlsf_calloc(elements, elem_size) | 40 | #define calloc(elements, elem_size) tlsf_calloc(elements, elem_size) |
44 | 41 | ||
45 | /* Audio declarations. */ | 42 | /* Audio declarations. */ |
46 | #define PD_SAMPLERATE 22050 | 43 | #ifdef SIMULATOR |
44 | #define PD_SAMPLERATE 44100 | ||
45 | #elif (HW_SAMPR_CAPS & SAMPR_CAP_22) | ||
46 | #define PD_SAMPLERATE 22050 | ||
47 | #elif (HW_SAMPR_CAPS & SAMPR_CAP_32) | ||
48 | #define PD_SAMPLERATE 32000 | ||
49 | #elif (HW_SAMPR_CAPS & SAMPR_CAP_44) | ||
50 | #define PD_SAMPLERATE 44100 | ||
51 | #else | ||
52 | #error No sufficient sample rate available! | ||
53 | #endif | ||
47 | #define PD_SAMPLES_PER_HZ ((PD_SAMPLERATE / HZ) + \ | 54 | #define PD_SAMPLES_PER_HZ ((PD_SAMPLERATE / HZ) + \ |
48 | (PD_SAMPLERATE % HZ > 0 ? 1 : 0)) | 55 | (PD_SAMPLERATE % HZ > 0 ? 1 : 0)) |
49 | #define PD_OUT_CHANNELS 2 | 56 | #define PD_OUT_CHANNELS 2 |