summaryrefslogtreecommitdiff
path: root/apps/codecs/libmusepack/internal.h
diff options
context:
space:
mode:
authorThom Johansen <thomj@rockbox.org>2006-01-30 01:00:40 +0000
committerThom Johansen <thomj@rockbox.org>2006-01-30 01:00:40 +0000
commit2b483958f961637e296432632a5b891eb061c22d (patch)
tree180fd3596df375fa56732050a7cc20ebdbc3cdb7 /apps/codecs/libmusepack/internal.h
parent58231d50f2cb940a309814e31ae583b4b0dfed24 (diff)
downloadrockbox-2b483958f961637e296432632a5b891eb061c22d.zip
rockbox-2b483958f961637e296432632a5b891eb061c22d.tar.gz
rockbox-2b483958f961637e296432632a5b891eb061c22d.tar.bz2
rockbox-2b483958f961637e296432632a5b891eb061c22d.tar.xz
Synced libmpcdec to musepack.net SVN.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@8488 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/codecs/libmusepack/internal.h')
-rw-r--r--apps/codecs/libmusepack/internal.h20
1 files changed, 14 insertions, 6 deletions
diff --git a/apps/codecs/libmusepack/internal.h b/apps/codecs/libmusepack/internal.h
index 27656d5..19642a2 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