diff options
author | Dave Chapman <dave@dchapman.com> | 2005-09-22 18:47:04 +0000 |
---|---|---|
committer | Dave Chapman <dave@dchapman.com> | 2005-09-22 18:47:04 +0000 |
commit | 711b2e3c886c52e04cfa3ed810f4a2ad688b5cf8 (patch) | |
tree | c703258d3869a17156259f5e8e9415337745c922 /apps/codecs/libalac/demux.h | |
parent | 025873b3acedd0fbc58b89f5d4a4e9437522a9ab (diff) | |
download | rockbox-711b2e3c886c52e04cfa3ed810f4a2ad688b5cf8.tar.gz rockbox-711b2e3c886c52e04cfa3ed810f4a2ad688b5cf8.zip |
Initial (unmodified - for reference) import of David Hammerton's Apple Lossless (ALAC) decoder from http://crazney.net/programs/itunes/alac.html
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@7541 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/codecs/libalac/demux.h')
-rw-r--r-- | apps/codecs/libalac/demux.h | 55 |
1 files changed, 55 insertions, 0 deletions
diff --git a/apps/codecs/libalac/demux.h b/apps/codecs/libalac/demux.h new file mode 100644 index 0000000000..62b949fa3b --- /dev/null +++ b/apps/codecs/libalac/demux.h | |||
@@ -0,0 +1,55 @@ | |||
1 | #ifndef DEMUX_H | ||
2 | #define DEMUX_H | ||
3 | |||
4 | #include <stdint.h> | ||
5 | #include "stream.h" | ||
6 | |||
7 | typedef uint32_t fourcc_t; | ||
8 | |||
9 | typedef struct | ||
10 | { | ||
11 | uint16_t num_channels; | ||
12 | uint16_t sample_size; | ||
13 | uint32_t sample_rate; | ||
14 | fourcc_t format; | ||
15 | void *buf; | ||
16 | |||
17 | struct { | ||
18 | uint32_t sample_count; | ||
19 | uint32_t sample_duration; | ||
20 | } *time_to_sample; | ||
21 | uint32_t num_time_to_samples; | ||
22 | |||
23 | uint32_t *sample_byte_size; | ||
24 | uint32_t num_sample_byte_sizes; | ||
25 | |||
26 | uint32_t codecdata_len; | ||
27 | void *codecdata; | ||
28 | |||
29 | uint32_t mdat_len; | ||
30 | #if 0 | ||
31 | void *mdat; | ||
32 | #endif | ||
33 | } demux_res_t; | ||
34 | |||
35 | int qtmovie_read(stream_t *stream, demux_res_t *demux_res); | ||
36 | |||
37 | #ifndef MAKEFOURCC | ||
38 | #define MAKEFOURCC(ch0, ch1, ch2, ch3) ( \ | ||
39 | ( (int32_t)(char)(ch0) << 24 ) | \ | ||
40 | ( (int32_t)(char)(ch1) << 16 ) | \ | ||
41 | ( (int32_t)(char)(ch2) << 8 ) | \ | ||
42 | ( (int32_t)(char)(ch3) ) ) | ||
43 | #endif | ||
44 | |||
45 | #ifndef SLPITFOURCC | ||
46 | /* splits it into ch0, ch1, ch2, ch3 - use for printf's */ | ||
47 | #define SPLITFOURCC(code) \ | ||
48 | (char)((int32_t)code >> 24), \ | ||
49 | (char)((int32_t)code >> 16), \ | ||
50 | (char)((int32_t)code >> 8), \ | ||
51 | (char)code | ||
52 | #endif | ||
53 | |||
54 | #endif /* DEMUX_H */ | ||
55 | |||