From 906905aa43566c16913238a71ccc13d438af1702 Mon Sep 17 00:00:00 2001 From: Michael Sevakis Date: Mon, 5 Dec 2011 13:58:35 +0000 Subject: Use a macro for aligning PCM chunks instead of explictly coding it each time. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@31152 a1c6a512-1295-4272-9138-f99709370657 --- firmware/export/pcm-internal.h | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'firmware/export/pcm-internal.h') diff --git a/firmware/export/pcm-internal.h b/firmware/export/pcm-internal.h index 16e2aeae4d..d881963ebd 100644 --- a/firmware/export/pcm-internal.h +++ b/firmware/export/pcm-internal.h @@ -22,6 +22,11 @@ #ifndef PCM_INTERNAL_H #define PCM_INTERNAL_H +/* Cheapo buffer align macro to align to the 16-16 PCM size */ +#define ALIGN_AUDIOBUF(start, size) \ + ({ (start) = (void *)(((uintptr_t)(start) + 3) & ~3); \ + (size) &= ~3; }) + struct pcm_peaks { long period; -- cgit v1.2.3