summaryrefslogtreecommitdiff
path: root/apps
diff options
context:
space:
mode:
Diffstat (limited to 'apps')
-rw-r--r--apps/codecs/a52_rm.c1
-rw-r--r--apps/metadata/rm.c14
2 files changed, 14 insertions, 1 deletions
diff --git a/apps/codecs/a52_rm.c b/apps/codecs/a52_rm.c
index ae4f542b02..50269aea9d 100644
--- a/apps/codecs/a52_rm.c
+++ b/apps/codecs/a52_rm.c
@@ -45,6 +45,7 @@ static void init_rm(RMContext *rmctx)
/* used outside liba52 */
static uint8_t buf[3840] IBSS_ATTR;
+/* The following two functions, a52_decode_data and output_audio are taken from apps/codecs/a52.c */
static inline void output_audio(sample_t *samples)
{
ci->yield();
diff --git a/apps/metadata/rm.c b/apps/metadata/rm.c
index c74acef5dd..7ab85794ff 100644
--- a/apps/metadata/rm.c
+++ b/apps/metadata/rm.c
@@ -38,9 +38,21 @@
#define DEBUGF(...)
#endif
+#ifdef DEBUG_RM
+static uint16_t get_uint16be(uint8_t *buf)
+{
+ return (uint16_t)((buf[0] << 8)|buf[1]);
+}
+
+static uint32_t get_uint32be(uint8_t *buf)
+{
+ return (uint32_t)((buf[0] << 24) | (buf[1] << 16) | (buf[2] << 8) | buf[3]);
+}
+#endif
+
static inline void print_cook_extradata(RMContext *rmctx) {
- DEBUGF(" cook_version = 0x%08x\n", get_uint32be(rmctx->codec_extradata));
+ DEBUGF(" cook_version = 0x%08lx\n", get_uint32be(rmctx->codec_extradata));
DEBUGF(" samples_per_frame_per_channel = %d\n", get_uint16be(&rmctx->codec_extradata[4]));
DEBUGF(" number_of_subbands_in_freq_domain = %d\n", get_uint16be(&rmctx->codec_extradata[6]));
if(rmctx->extradata_size == 16) {