summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--apps/plugins/pdbox/pdbox.h31
1 files changed, 1 insertions, 30 deletions
diff --git a/apps/plugins/pdbox/pdbox.h b/apps/plugins/pdbox/pdbox.h
index ce29c1e800..1416990f5e 100644
--- a/apps/plugins/pdbox/pdbox.h
+++ b/apps/plugins/pdbox/pdbox.h
@@ -32,40 +32,15 @@
32#include "PDa/src/m_pd.h" 32#include "PDa/src/m_pd.h"
33 33
34/* Minimal memory size. */ 34/* Minimal memory size. */
35#define MIN_MEM_SIZE (4 * 1024 * 1024) 35#define MIN_MEM_SIZE (2 * 1024 * 1024)
36 36
37/* Memory prototypes. */ 37/* Memory prototypes. */
38 38
39#if 1
40/* Direct memory allocator functions to TLSF. */ 39/* Direct memory allocator functions to TLSF. */
41#define malloc(size) tlsf_malloc(size) 40#define malloc(size) tlsf_malloc(size)
42#define free(ptr) tlsf_free(ptr) 41#define free(ptr) tlsf_free(ptr)
43#define realloc(ptr, size) tlsf_realloc(ptr, size) 42#define realloc(ptr, size) tlsf_realloc(ptr, size)
44#define calloc(elements, elem_size) tlsf_calloc(elements, elem_size) 43#define calloc(elements, elem_size) tlsf_calloc(elements, elem_size)
45#endif
46
47#if 0
48extern void set_memory_pool(void* memory_pool, size_t memory_size);
49extern void clear_memory_pool(void);
50extern void* mcalloc(size_t nmemb, size_t size);
51extern void* mmalloc(size_t size);
52extern void mfree(void* ptr);
53extern void* mrealloc(void* ptr, size_t size);
54extern 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
69 44
70/* Audio declarations. */ 45/* Audio declarations. */
71#define PD_SAMPLERATE 22050 46#define PD_SAMPLERATE 22050
@@ -74,11 +49,7 @@ extern void print_memory_pool(void);
74#define PD_OUT_CHANNELS 2 49#define PD_OUT_CHANNELS 2
75 50
76/* Audio buffer part. Contains data for one HZ period. */ 51/* Audio buffer part. Contains data for one HZ period. */
77#ifdef SIMULATOR
78#define AUDIOBUFSIZE (PD_SAMPLES_PER_HZ * PD_OUT_CHANNELS * 32)
79#else
80#define AUDIOBUFSIZE (PD_SAMPLES_PER_HZ * PD_OUT_CHANNELS) 52#define AUDIOBUFSIZE (PD_SAMPLES_PER_HZ * PD_OUT_CHANNELS)
81#endif
82struct audio_buffer 53struct audio_buffer
83{ 54{
84 int16_t data[AUDIOBUFSIZE]; 55 int16_t data[AUDIOBUFSIZE];