From a24017f4da1be50a43bd14db607205582abc7544 Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Mon, 27 Jun 2005 21:23:03 +0000 Subject: Moved the codec and plugin buffer sizes to the config-*.h files instead of having it repeated in numerous files where they all had to be updated to the same value if ever changed. This allows specific models to actually have its own buffer sizes. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@6901 a1c6a512-1295-4272-9138-f99709370657 --- apps/codecs.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'apps/codecs.c') diff --git a/apps/codecs.c b/apps/codecs.c index da4b1f8..16338c2 100644 --- a/apps/codecs.c +++ b/apps/codecs.c @@ -16,6 +16,8 @@ * KIND, either express or implied. * ****************************************************************************/ +#include "config.h" + #include #include #include @@ -52,7 +54,7 @@ #ifdef SIMULATOR #if CONFIG_HWCODEC == MASNONE -static unsigned char codecbuf[CODEC_BUFFER_SIZE]; +static unsigned char codecbuf[CODEC_SIZE]; #endif void *sim_codec_load(char *plugin, int *fd); void sim_codec_close(int fd); @@ -251,9 +253,9 @@ int codec_load_ram(char* codecptr, size_t size, void* ptr2, size_t bufwrap) if ((char *)&codecbuf[0] != codecptr) { /* zero out codec buffer to ensure a properly zeroed bss area */ - memset(codecbuf, 0, CODEC_BUFFER_SIZE); + memset(codecbuf, 0, CODEC_SIZE); - size = MIN(size, CODEC_BUFFER_SIZE); + size = MIN(size, CODEC_SIZE); copy_n = MIN(size, bufwrap); memcpy(codecbuf, codecptr, copy_n); size -= copy_n; @@ -283,7 +285,7 @@ int codec_load_file(const char *plugin) return fd; } - rc = read(fd, &codecbuf[0], CODEC_BUFFER_SIZE); + rc = read(fd, &codecbuf[0], CODEC_SIZE); close(fd); if (rc <= 0) { logf("Codec read error"); -- cgit v1.1