diff options
Diffstat (limited to 'apps/plugins/pdbox/pdbox.h')
-rw-r--r-- | apps/plugins/pdbox/pdbox.h | 45 |
1 files changed, 38 insertions, 7 deletions
diff --git a/apps/plugins/pdbox/pdbox.h b/apps/plugins/pdbox/pdbox.h index 2ca5bc8d4f..47aa2ec4d8 100644 --- a/apps/plugins/pdbox/pdbox.h +++ b/apps/plugins/pdbox/pdbox.h | |||
@@ -22,19 +22,50 @@ | |||
22 | #ifndef PDBOX_H | 22 | #ifndef PDBOX_H |
23 | #define PDBOX_H | 23 | #define PDBOX_H |
24 | 24 | ||
25 | /* Use dbestfit. */ | 25 | |
26 | #include "bmalloc.h" | 26 | #if 1 |
27 | #include "dmalloc.h" | 27 | /* Use TLSF. */ |
28 | #include "tlsf.h" | ||
29 | #endif | ||
28 | 30 | ||
29 | /* Pure Data */ | 31 | /* Pure Data */ |
30 | #include "m_pd.h" | 32 | #include "m_pd.h" |
31 | 33 | ||
32 | |||
33 | /* dbestfit declarations. */ | ||
34 | |||
35 | /* Minimal memory size. */ | 34 | /* Minimal memory size. */ |
36 | #define MIN_MEM_SIZE (4 * 1024 * 1024) | 35 | #define MIN_MEM_SIZE (4 * 1024 * 1024) |
37 | 36 | ||
37 | /* Memory prototypes. */ | ||
38 | |||
39 | #if 1 | ||
40 | /* Direct memory allocator functions to TLSF. */ | ||
41 | #define malloc(size) tlsf_malloc(size) | ||
42 | #define free(ptr) tlsf_free(ptr) | ||
43 | #define realloc(ptr, size) tlsf_realloc(ptr, size) | ||
44 | #define calloc(elements, elem_size) tlsf_calloc(elements, elem_size) | ||
45 | #endif | ||
46 | |||
47 | #if 0 | ||
48 | extern void set_memory_pool(void* memory_pool, size_t memory_size); | ||
49 | extern void clear_memory_pool(void); | ||
50 | extern void* mcalloc(size_t nmemb, size_t size); | ||
51 | extern void* mmalloc(size_t size); | ||
52 | extern void mfree(void* ptr); | ||
53 | extern void* mrealloc(void* ptr, size_t size); | ||
54 | extern void print_memory_pool(void); | ||
55 | |||
56 | #define malloc mmalloc | ||
57 | #define free mfree | ||
58 | #define realloc mrealloc | ||
59 | #define calloc mcalloc | ||
60 | #endif | ||
61 | |||
62 | #if 0 | ||
63 | #include <stdlib.h> | ||
64 | #define malloc malloc | ||
65 | #define free free | ||
66 | #define realloc realloc | ||
67 | #define calloc calloc | ||
68 | #endif | ||
38 | 69 | ||
39 | /* Audio declarations. */ | 70 | /* Audio declarations. */ |
40 | #define PD_SAMPLERATE 22050 | 71 | #define PD_SAMPLERATE 22050 |
@@ -44,7 +75,7 @@ | |||
44 | 75 | ||
45 | /* Audio buffer part. Contains data for one HZ period. */ | 76 | /* Audio buffer part. Contains data for one HZ period. */ |
46 | #ifdef SIMULATOR | 77 | #ifdef SIMULATOR |
47 | #define AUDIOBUFSIZE (PD_SAMPLES_PER_HZ * PD_OUT_CHANNELS * 4) | 78 | #define AUDIOBUFSIZE (PD_SAMPLES_PER_HZ * PD_OUT_CHANNELS * 32) |
48 | #else | 79 | #else |
49 | #define AUDIOBUFSIZE (PD_SAMPLES_PER_HZ * PD_OUT_CHANNELS) | 80 | #define AUDIOBUFSIZE (PD_SAMPLES_PER_HZ * PD_OUT_CHANNELS) |
50 | #endif | 81 | #endif |