From 561cb2c4018ba6a83f742964de8cb892fac02c26 Mon Sep 17 00:00:00 2001 From: Yoshihisa Uchida Date: Sun, 28 Feb 2010 08:48:07 +0000 Subject: Add wave64(.w64) codec (FS#11022) git-svn-id: svn://svn.rockbox.org/rockbox/trunk@24959 a1c6a512-1295-4272-9138-f99709370657 --- apps/metadata/metadata_common.c | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'apps/metadata/metadata_common.c') diff --git a/apps/metadata/metadata_common.c b/apps/metadata/metadata_common.c index 318399693c..fd1cd553e8 100644 --- a/apps/metadata/metadata_common.c +++ b/apps/metadata/metadata_common.c @@ -174,6 +174,15 @@ int read_uint64le(int fd, uint64_t* buf) } #endif +/* Read an unaligned 64-bit little endian unsigned integer from buffer. */ +uint64_t get_uint64_le(void* buf) +{ + unsigned char* p = (unsigned char*) buf; + + return p[0] | (p[1] << 8) | (p[2] << 16) | (p[3] << 24) | ((uint64_t)p[4] << 32) | + ((uint64_t)p[5] << 40) | ((uint64_t)p[6] << 48) | ((uint64_t)p[7] << 56); +} + /* Read an unaligned 32-bit little endian long from buffer. */ unsigned long get_long_le(void* buf) { -- cgit v1.2.3