summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMohamed Tarek <mt@rockbox.org>2009-05-22 19:51:36 +0000
committerMohamed Tarek <mt@rockbox.org>2009-05-22 19:51:36 +0000
commit694b3b734f8b1cddb323b29e74929a35bb5cd9ef (patch)
treea6d7954c1783db5f36b9064d544bf30e2445ec0f
parent9389a5a4d1275bf2a9d4d3245fa5083225cc222b (diff)
-Remove some unnecessary defines from rm.c.
-Modify code related to the renamed rm.[c/h] instead of rm2wav.[c/h]. -Remove struct cook_extradata from rm.c as it is not used. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@21041 a1c6a512-1295-4272-9138-f99709370657
-rw-r--r--apps/codecs/libcook/Makefile.test2
-rw-r--r--apps/codecs/libcook/cook.h2
-rw-r--r--apps/codecs/libcook/main.c2
-rw-r--r--apps/codecs/libcook/rm.c21
-rw-r--r--apps/codecs/libcook/rm.h4
5 files changed, 6 insertions, 25 deletions
diff --git a/apps/codecs/libcook/Makefile.test b/apps/codecs/libcook/Makefile.test
index d5d91708fd..a12554482c 100644
--- a/apps/codecs/libcook/Makefile.test
+++ b/apps/codecs/libcook/Makefile.test
@@ -1,5 +1,5 @@
CFLAGS = -Wall -O3
-OBJS = main.o bitstream.o cook.o rm2wav.o
+OBJS = main.o bitstream.o cook.o rm.o
cooktest: $(OBJS)
gcc -o cooktest $(OBJS)
diff --git a/apps/codecs/libcook/cook.h b/apps/codecs/libcook/cook.h
index da3c03f1d0..f5da639eb5 100644
--- a/apps/codecs/libcook/cook.h
+++ b/apps/codecs/libcook/cook.h
@@ -24,7 +24,7 @@
#include <stdint.h>
#include "bitstream.h"
-#include "rm2wav.h"
+#include "rm.h"
#include "cookdata_fixpoint.h"
typedef struct {
diff --git a/apps/codecs/libcook/main.c b/apps/codecs/libcook/main.c
index c13e74a201..b0b2829f25 100644
--- a/apps/codecs/libcook/main.c
+++ b/apps/codecs/libcook/main.c
@@ -25,7 +25,7 @@
#include <unistd.h>
#include <string.h>
-#include "rm2wav.h"
+#include "rm.h"
#include "cook.h"
//#define DUMP_RAW_FRAMES
diff --git a/apps/codecs/libcook/rm.c b/apps/codecs/libcook/rm.c
index f2e9635bfc..92b6428462 100644
--- a/apps/codecs/libcook/rm.c
+++ b/apps/codecs/libcook/rm.c
@@ -27,11 +27,7 @@
#include <fcntl.h>
#include <unistd.h>
-#include "rm2wav.h"
-
-#define MAX_PATH 260
-#define PKT_HEADER_SIZE 12
-#define RAW_AUDIO_DATA packet_length-PKT_HEADER_SIZE
+#include "rm.h"
#if 0
@@ -40,23 +36,8 @@
#else
#define DEBUGF(...)
#endif
-
-/* ASF codec IDs */
-#define CODEC_ID_WMAV1 0x160
-#define CODEC_ID_WMAV2 0x161
/* Some Rockbox-like functions (these should be implemented in metadata_common.[ch] */
-struct cook_extradata {
- uint32_t cook_version;
- uint16_t samples_pf_pc; /* samples per frame per channel */
- uint16_t nb_subbands; /* number of subbands in the frequency domain */
-
- /* extra 8 bytes for stereo data */
- uint32_t unused;
- uint16_t js_subband_start; /* joint stereo subband start */
- uint16_t js_vlc_bits;
-};
-
static int read_uint8(int fd, uint8_t* buf)
{
unsigned char tmp[1];
diff --git a/apps/codecs/libcook/rm.h b/apps/codecs/libcook/rm.h
index f36145fc19..8e2ebe8a16 100644
--- a/apps/codecs/libcook/rm.h
+++ b/apps/codecs/libcook/rm.h
@@ -18,8 +18,8 @@
* KIND, either express or implied.
*
****************************************************************************/
-#ifndef _RM2WAV_H
-#define _RM2WAV_H
+#ifndef _RM_H
+#define _RM_H
#include <stdio.h>
#include <stdint.h>