summaryrefslogtreecommitdiff
path: root/apps/codecs/demac/libdemac/parser.c
diff options
context:
space:
mode:
authorDave Chapman <dave@dchapman.com>2007-06-09 00:58:15 +0000
committerDave Chapman <dave@dchapman.com>2007-06-09 00:58:15 +0000
commit613199653883dbb7283e33c09728a6dfde41e3bf (patch)
treec26dd1ad91a1826a0ed26f1b186e192c9c230461 /apps/codecs/demac/libdemac/parser.c
parentbcac36468f21ba316147ef9b436f999d988bfb87 (diff)
Define and use a local APE_MAX function to make the standalone demac decoder compile again.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@13601 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/codecs/demac/libdemac/parser.c')
-rw-r--r--apps/codecs/demac/libdemac/parser.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/apps/codecs/demac/libdemac/parser.c b/apps/codecs/demac/libdemac/parser.c
index 7e0fd8f250..ebde36deed 100644
--- a/apps/codecs/demac/libdemac/parser.c
+++ b/apps/codecs/demac/libdemac/parser.c
@@ -35,6 +35,11 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110, USA
#include "parser.h"
+#ifdef APE_MAX
+#undef APE_MAX
+#endif
+#define APE_MAX(a,b) ((a)>(b)?(a):(b))
+
static inline int16_t get_int16(unsigned char* buf)
{
@@ -148,8 +153,8 @@ int ape_parseheaderbuf(unsigned char* buf, struct ape_ctx_t* ape_ctx)
if (ape_ctx->totalframes > 1)
ape_ctx->totalsamples += ape_ctx->blocksperframe * (ape_ctx->totalframes-1);
- ape_ctx->numseekpoints = MAX(ape_ctx->maxseekpoints,
- ape_ctx->seektablelength / sizeof(int32_t));
+ ape_ctx->numseekpoints = APE_MAX(ape_ctx->maxseekpoints,
+ ape_ctx->seektablelength / sizeof(int32_t));
return 0;
}