summaryrefslogtreecommitdiffstats
path: root/apps/plugins/pdbox
diff options
context:
space:
mode:
authorWincent Balin <wincent@rockbox.org>2010-06-01 00:26:28 +0000
committerWincent Balin <wincent@rockbox.org>2010-06-01 00:26:28 +0000
commitc225b170158f2419a3dcff9a119ee9b6d062e207 (patch)
tree4217cf0746e1893671dfba727372f39170b52cb3 /apps/plugins/pdbox
parenta266ff185a3f03b6fde88df6eca0c4941c8564f2 (diff)
downloadrockbox-c225b170158f2419a3dcff9a119ee9b6d062e207.tar.gz
rockbox-c225b170158f2419a3dcff9a119ee9b6d062e207.tar.bz2
rockbox-c225b170158f2419a3dcff9a119ee9b6d062e207.zip
pdbox: Removed unnecessary code from the main include file. Reduced neede memory to 2 MB.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@26440 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/plugins/pdbox')
-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 @@
#include "PDa/src/m_pd.h"
/* Minimal memory size. */
-#define MIN_MEM_SIZE (4 * 1024 * 1024)
+#define MIN_MEM_SIZE (2 * 1024 * 1024)
/* Memory prototypes. */
-#if 1
/* Direct memory allocator functions to TLSF. */
#define malloc(size) tlsf_malloc(size)
#define free(ptr) tlsf_free(ptr)
#define realloc(ptr, size) tlsf_realloc(ptr, size)
#define calloc(elements, elem_size) tlsf_calloc(elements, elem_size)
-#endif
-
-#if 0
-extern void set_memory_pool(void* memory_pool, size_t memory_size);
-extern void clear_memory_pool(void);
-extern void* mcalloc(size_t nmemb, size_t size);
-extern void* mmalloc(size_t size);
-extern void mfree(void* ptr);
-extern void* mrealloc(void* ptr, size_t size);
-extern void print_memory_pool(void);
-
-#define malloc mmalloc
-#define free mfree
-#define realloc mrealloc
-#define calloc mcalloc
-#endif
-
-#if 0
-#include <stdlib.h>
-#define malloc malloc
-#define free free
-#define realloc realloc
-#define calloc calloc
-#endif
/* Audio declarations. */
#define PD_SAMPLERATE 22050
@@ -74,11 +49,7 @@ extern void print_memory_pool(void);
#define PD_OUT_CHANNELS 2
/* Audio buffer part. Contains data for one HZ period. */
-#ifdef SIMULATOR
-#define AUDIOBUFSIZE (PD_SAMPLES_PER_HZ * PD_OUT_CHANNELS * 32)
-#else
#define AUDIOBUFSIZE (PD_SAMPLES_PER_HZ * PD_OUT_CHANNELS)
-#endif
struct audio_buffer
{
int16_t data[AUDIOBUFSIZE];