summaryrefslogtreecommitdiffstats
path: root/DOCS/tech/realcodecs/audio-codecs.txt
blob: a2e8f02d22f457028f67b78f69fa90a07ed7729d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
all audio codecs (cook,atrk,14_4,28_8,dnet,sipr) have the same interface,
but i have only analyzed the cook codec


audio properties

00 short text/description of the format (bitrate, when to use)
01 bitrate (bits/s) //avg. bytes/sec output
02 ulong: ?
   ulong: samples per second
   ushort: bits/sample
   ushort: number of channels
03 same as 02 //constant 2
04 long description
05 constant 1 (always?)
06 ulong: block align (input frame size for RADecode)
07 string: minimum player version
08 n/a
09 n/a
0A n/a
0B n/a
0C n/a
0D ?
0E ?
0F ?
10 ?
11 ?
12 ?
13 min. output buffer size? max. number of samples?
14 ?




functions:

ulong result=RAOpenCodec2(ra_main_t *raMain);

ulong result=RAInitDecoder(ra_main_t *raMain, p2);
p2 points to an array of 7 longs:

bfffefe0  22 56 00 00 10 00 02 00 64 00 00 00 3c 00 00 00   "V......d...<...
bfffeff0  58 02 00 00 10 00 00 00 f0 73 1c 08 7c f0 ff bf   X........s..|...

long  00005622=22050 (Hz)
short     0010=16 (bit)
short     0002=2  (channels)
long  00000064=100 ???
long  0000003c=60  ???
long  00000258=600 packet size (used for 'p3' of RADecode)
long  00000010=16  ???
long  081c73f0= looks like a pointer


void *GetRAFlavorProperty(ra_main_t *raMain, ulong flavor, ulong property,
	short *property_length_in_bytes);
returns property data for a specific data

ulong RADecode(ra_main_t *raMain, char *input_buffer,
	ulong input_buffer_size, char *output_buffer,
	ulong *decoded_bytes, ulong p6=-1);

RAFreeDecoder(ra_main_t *);

RACloseCodec(ra_main_t *);


ulong RASetFlavor(ra_main_t *ra_main, ulong flavor);
a flavor is an entry in the list of available format variations like
bitrate, number of channels, decoding algorithm, and so on