From 2b483958f961637e296432632a5b891eb061c22d Mon Sep 17 00:00:00 2001 From: Thom Johansen Date: Mon, 30 Jan 2006 01:00:40 +0000 Subject: Synced libmpcdec to musepack.net SVN. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@8488 a1c6a512-1295-4272-9138-f99709370657 --- apps/codecs/libmusepack/internal.h | 20 ++++++++++++++------ 1 file changed, 14 insertions(+), 6 deletions(-) (limited to 'apps/codecs/libmusepack/internal.h') diff --git a/apps/codecs/libmusepack/internal.h b/apps/codecs/libmusepack/internal.h index 27656d5a54..19642a240e 100644 --- a/apps/codecs/libmusepack/internal.h +++ b/apps/codecs/libmusepack/internal.h @@ -32,16 +32,24 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -/// \file musepack_internal.h -/// Definitions and structures used only internally by the libmusepack. +/// \file internal.h +/// Definitions and structures used only internally by the libmpcdec. + +#ifndef _mpcdec_internal_h +#define _mpcdec_internal_h -#ifndef _musepack_internal_h -#define _musepack_internal_h enum { MPC_DECODER_SYNTH_DELAY = 481 }; +/// Big/little endian 32 bit byte swapping routine. +static __inline +mpc_uint32_t mpc_swap32(mpc_uint32_t val) { + return (((val & 0xff000000) >> 24) | ((val & 0x00ff0000) >> 8) | + ((val & 0x0000ff00) << 8) | ((val & 0x000000ff) << 24)); +} + /// Searches for a ID3v2-tag and reads the length (in bytes) of it. /// \param reader supplying raw stream data /// \return size of tag, in bytes @@ -49,9 +57,9 @@ enum { mpc_int32_t JumpID3v2(mpc_reader* fp); /// helper functions used by multiple files -mpc_uint32_t random_int(mpc_decoder *d); // in synth_filter.c +mpc_uint32_t mpc_random_int(mpc_decoder *d); // in synth_filter.c void mpc_decoder_initialisiere_quantisierungstabellen(mpc_decoder *d, double scale_factor); void mpc_decoder_synthese_filter_float(mpc_decoder *d, MPC_SAMPLE_FORMAT* OutData); -#endif // _musepack_internal_h +#endif // _mpcdec_internal_h -- cgit v1.2.3