1
0
Fork 0
forked from len0rd/rockbox

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
This commit is contained in:
Wincent Balin 2010-06-01 00:26:28 +00:00
parent a266ff185a
commit c225b17015

View file

@ -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];