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)
downloadrockbox-694b3b734f8b1cddb323b29e74929a35bb5cd9ef.tar.gz
rockbox-694b3b734f8b1cddb323b29e74929a35bb5cd9ef.zip
-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 @@
1CFLAGS = -Wall -O3 1CFLAGS = -Wall -O3
2OBJS = main.o bitstream.o cook.o rm2wav.o 2OBJS = main.o bitstream.o cook.o rm.o
3cooktest: $(OBJS) 3cooktest: $(OBJS)
4 gcc -o cooktest $(OBJS) 4 gcc -o cooktest $(OBJS)
5 5
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 @@
24 24
25#include <stdint.h> 25#include <stdint.h>
26#include "bitstream.h" 26#include "bitstream.h"
27#include "rm2wav.h" 27#include "rm.h"
28#include "cookdata_fixpoint.h" 28#include "cookdata_fixpoint.h"
29 29
30typedef struct { 30typedef 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 @@
25#include <unistd.h> 25#include <unistd.h>
26#include <string.h> 26#include <string.h>
27 27
28#include "rm2wav.h" 28#include "rm.h"
29#include "cook.h" 29#include "cook.h"
30 30
31//#define DUMP_RAW_FRAMES 31//#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 @@
27#include <fcntl.h> 27#include <fcntl.h>
28#include <unistd.h> 28#include <unistd.h>
29 29
30#include "rm2wav.h" 30#include "rm.h"
31
32#define MAX_PATH 260
33#define PKT_HEADER_SIZE 12
34#define RAW_AUDIO_DATA packet_length-PKT_HEADER_SIZE
35 31
36 32
37#if 0 33#if 0
@@ -40,23 +36,8 @@
40#else 36#else
41#define DEBUGF(...) 37#define DEBUGF(...)
42#endif 38#endif
43
44/* ASF codec IDs */
45#define CODEC_ID_WMAV1 0x160
46#define CODEC_ID_WMAV2 0x161
47 39
48/* Some Rockbox-like functions (these should be implemented in metadata_common.[ch] */ 40/* Some Rockbox-like functions (these should be implemented in metadata_common.[ch] */
49struct cook_extradata {
50 uint32_t cook_version;
51 uint16_t samples_pf_pc; /* samples per frame per channel */
52 uint16_t nb_subbands; /* number of subbands in the frequency domain */
53
54 /* extra 8 bytes for stereo data */
55 uint32_t unused;
56 uint16_t js_subband_start; /* joint stereo subband start */
57 uint16_t js_vlc_bits;
58};
59
60static int read_uint8(int fd, uint8_t* buf) 41static int read_uint8(int fd, uint8_t* buf)
61{ 42{
62 unsigned char tmp[1]; 43 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 @@
18 * KIND, either express or implied. 18 * KIND, either express or implied.
19 * 19 *
20 ****************************************************************************/ 20 ****************************************************************************/
21#ifndef _RM2WAV_H 21#ifndef _RM_H
22#define _RM2WAV_H 22#define _RM_H
23 23
24#include <stdio.h> 24#include <stdio.h>
25#include <stdint.h> 25#include <stdint.h>