author | koda |
Tue, 02 Apr 2013 23:02:06 +0200 | |
changeset 8832 | 4e9728dcebeb |
parent 7849 | a12155461b34 |
permissions | -rw-r--r-- |
5170
f7e49eff3708
add libTremor sources (integer-only libvorbis implementation) to repo and ios project
koda
parents:
diff
changeset
|
1 |
/******************************************************************** |
f7e49eff3708
add libTremor sources (integer-only libvorbis implementation) to repo and ios project
koda
parents:
diff
changeset
|
2 |
* * |
f7e49eff3708
add libTremor sources (integer-only libvorbis implementation) to repo and ios project
koda
parents:
diff
changeset
|
3 |
* THIS FILE IS PART OF THE OggVorbis 'TREMOR' CODEC SOURCE CODE. * |
f7e49eff3708
add libTremor sources (integer-only libvorbis implementation) to repo and ios project
koda
parents:
diff
changeset
|
4 |
* * |
f7e49eff3708
add libTremor sources (integer-only libvorbis implementation) to repo and ios project
koda
parents:
diff
changeset
|
5 |
* USE, DISTRIBUTION AND REPRODUCTION OF THIS LIBRARY SOURCE IS * |
f7e49eff3708
add libTremor sources (integer-only libvorbis implementation) to repo and ios project
koda
parents:
diff
changeset
|
6 |
* GOVERNED BY A BSD-STYLE SOURCE LICENSE INCLUDED WITH THIS SOURCE * |
f7e49eff3708
add libTremor sources (integer-only libvorbis implementation) to repo and ios project
koda
parents:
diff
changeset
|
7 |
* IN 'COPYING'. PLEASE READ THESE TERMS BEFORE DISTRIBUTING. * |
f7e49eff3708
add libTremor sources (integer-only libvorbis implementation) to repo and ios project
koda
parents:
diff
changeset
|
8 |
* * |
f7e49eff3708
add libTremor sources (integer-only libvorbis implementation) to repo and ios project
koda
parents:
diff
changeset
|
9 |
* THE OggVorbis 'TREMOR' SOURCE CODE IS (C) COPYRIGHT 1994-2002 * |
f7e49eff3708
add libTremor sources (integer-only libvorbis implementation) to repo and ios project
koda
parents:
diff
changeset
|
10 |
* BY THE Xiph.Org FOUNDATION http://www.xiph.org/ * |
f7e49eff3708
add libTremor sources (integer-only libvorbis implementation) to repo and ios project
koda
parents:
diff
changeset
|
11 |
* * |
f7e49eff3708
add libTremor sources (integer-only libvorbis implementation) to repo and ios project
koda
parents:
diff
changeset
|
12 |
******************************************************************** |
f7e49eff3708
add libTremor sources (integer-only libvorbis implementation) to repo and ios project
koda
parents:
diff
changeset
|
13 |
|
f7e49eff3708
add libTremor sources (integer-only libvorbis implementation) to repo and ios project
koda
parents:
diff
changeset
|
14 |
function: libvorbis codec headers |
f7e49eff3708
add libTremor sources (integer-only libvorbis implementation) to repo and ios project
koda
parents:
diff
changeset
|
15 |
|
f7e49eff3708
add libTremor sources (integer-only libvorbis implementation) to repo and ios project
koda
parents:
diff
changeset
|
16 |
********************************************************************/ |
f7e49eff3708
add libTremor sources (integer-only libvorbis implementation) to repo and ios project
koda
parents:
diff
changeset
|
17 |
|
f7e49eff3708
add libTremor sources (integer-only libvorbis implementation) to repo and ios project
koda
parents:
diff
changeset
|
18 |
#ifndef _vorbis_codec_h_ |
f7e49eff3708
add libTremor sources (integer-only libvorbis implementation) to repo and ios project
koda
parents:
diff
changeset
|
19 |
#define _vorbis_codec_h_ |
f7e49eff3708
add libTremor sources (integer-only libvorbis implementation) to repo and ios project
koda
parents:
diff
changeset
|
20 |
|
f7e49eff3708
add libTremor sources (integer-only libvorbis implementation) to repo and ios project
koda
parents:
diff
changeset
|
21 |
#ifdef __cplusplus |
f7e49eff3708
add libTremor sources (integer-only libvorbis implementation) to repo and ios project
koda
parents:
diff
changeset
|
22 |
extern "C" |
f7e49eff3708
add libTremor sources (integer-only libvorbis implementation) to repo and ios project
koda
parents:
diff
changeset
|
23 |
{ |
f7e49eff3708
add libTremor sources (integer-only libvorbis implementation) to repo and ios project
koda
parents:
diff
changeset
|
24 |
#endif /* __cplusplus */ |
f7e49eff3708
add libTremor sources (integer-only libvorbis implementation) to repo and ios project
koda
parents:
diff
changeset
|
25 |
|
f7e49eff3708
add libTremor sources (integer-only libvorbis implementation) to repo and ios project
koda
parents:
diff
changeset
|
26 |
#include "ogg.h" |
f7e49eff3708
add libTremor sources (integer-only libvorbis implementation) to repo and ios project
koda
parents:
diff
changeset
|
27 |
|
f7e49eff3708
add libTremor sources (integer-only libvorbis implementation) to repo and ios project
koda
parents:
diff
changeset
|
28 |
typedef struct vorbis_info{ |
f7e49eff3708
add libTremor sources (integer-only libvorbis implementation) to repo and ios project
koda
parents:
diff
changeset
|
29 |
int version; |
f7e49eff3708
add libTremor sources (integer-only libvorbis implementation) to repo and ios project
koda
parents:
diff
changeset
|
30 |
int channels; |
f7e49eff3708
add libTremor sources (integer-only libvorbis implementation) to repo and ios project
koda
parents:
diff
changeset
|
31 |
long rate; |
f7e49eff3708
add libTremor sources (integer-only libvorbis implementation) to repo and ios project
koda
parents:
diff
changeset
|
32 |
|
f7e49eff3708
add libTremor sources (integer-only libvorbis implementation) to repo and ios project
koda
parents:
diff
changeset
|
33 |
/* The below bitrate declarations are *hints*. |
f7e49eff3708
add libTremor sources (integer-only libvorbis implementation) to repo and ios project
koda
parents:
diff
changeset
|
34 |
Combinations of the three values carry the following implications: |
f7e49eff3708
add libTremor sources (integer-only libvorbis implementation) to repo and ios project
koda
parents:
diff
changeset
|
35 |
|
f7e49eff3708
add libTremor sources (integer-only libvorbis implementation) to repo and ios project
koda
parents:
diff
changeset
|
36 |
all three set to the same value: |
f7e49eff3708
add libTremor sources (integer-only libvorbis implementation) to repo and ios project
koda
parents:
diff
changeset
|
37 |
implies a fixed rate bitstream |
f7e49eff3708
add libTremor sources (integer-only libvorbis implementation) to repo and ios project
koda
parents:
diff
changeset
|
38 |
only nominal set: |
f7e49eff3708
add libTremor sources (integer-only libvorbis implementation) to repo and ios project
koda
parents:
diff
changeset
|
39 |
implies a VBR stream that averages the nominal bitrate. No hard |
f7e49eff3708
add libTremor sources (integer-only libvorbis implementation) to repo and ios project
koda
parents:
diff
changeset
|
40 |
upper/lower limit |
f7e49eff3708
add libTremor sources (integer-only libvorbis implementation) to repo and ios project
koda
parents:
diff
changeset
|
41 |
upper and or lower set: |
f7e49eff3708
add libTremor sources (integer-only libvorbis implementation) to repo and ios project
koda
parents:
diff
changeset
|
42 |
implies a VBR bitstream that obeys the bitrate limits. nominal |
f7e49eff3708
add libTremor sources (integer-only libvorbis implementation) to repo and ios project
koda
parents:
diff
changeset
|
43 |
may also be set to give a nominal rate. |
f7e49eff3708
add libTremor sources (integer-only libvorbis implementation) to repo and ios project
koda
parents:
diff
changeset
|
44 |
none set: |
f7e49eff3708
add libTremor sources (integer-only libvorbis implementation) to repo and ios project
koda
parents:
diff
changeset
|
45 |
the coder does not care to speculate. |
f7e49eff3708
add libTremor sources (integer-only libvorbis implementation) to repo and ios project
koda
parents:
diff
changeset
|
46 |
*/ |
f7e49eff3708
add libTremor sources (integer-only libvorbis implementation) to repo and ios project
koda
parents:
diff
changeset
|
47 |
|
f7e49eff3708
add libTremor sources (integer-only libvorbis implementation) to repo and ios project
koda
parents:
diff
changeset
|
48 |
long bitrate_upper; |
f7e49eff3708
add libTremor sources (integer-only libvorbis implementation) to repo and ios project
koda
parents:
diff
changeset
|
49 |
long bitrate_nominal; |
f7e49eff3708
add libTremor sources (integer-only libvorbis implementation) to repo and ios project
koda
parents:
diff
changeset
|
50 |
long bitrate_lower; |
f7e49eff3708
add libTremor sources (integer-only libvorbis implementation) to repo and ios project
koda
parents:
diff
changeset
|
51 |
long bitrate_window; |
f7e49eff3708
add libTremor sources (integer-only libvorbis implementation) to repo and ios project
koda
parents:
diff
changeset
|
52 |
|
f7e49eff3708
add libTremor sources (integer-only libvorbis implementation) to repo and ios project
koda
parents:
diff
changeset
|
53 |
void *codec_setup; |
f7e49eff3708
add libTremor sources (integer-only libvorbis implementation) to repo and ios project
koda
parents:
diff
changeset
|
54 |
} vorbis_info; |
f7e49eff3708
add libTremor sources (integer-only libvorbis implementation) to repo and ios project
koda
parents:
diff
changeset
|
55 |
|
7849
a12155461b34
revert r767d3c4153a1 this tremor implementation is buggy
koda
parents:
7697
diff
changeset
|
56 |
/* vorbis_dsp_state buffers the current vorbis audio |
a12155461b34
revert r767d3c4153a1 this tremor implementation is buggy
koda
parents:
7697
diff
changeset
|
57 |
analysis/synthesis state. The DSP state belongs to a specific |
a12155461b34
revert r767d3c4153a1 this tremor implementation is buggy
koda
parents:
7697
diff
changeset
|
58 |
logical bitstream ****************************************************/ |
a12155461b34
revert r767d3c4153a1 this tremor implementation is buggy
koda
parents:
7697
diff
changeset
|
59 |
typedef struct vorbis_dsp_state{ |
a12155461b34
revert r767d3c4153a1 this tremor implementation is buggy
koda
parents:
7697
diff
changeset
|
60 |
int analysisp; |
a12155461b34
revert r767d3c4153a1 this tremor implementation is buggy
koda
parents:
7697
diff
changeset
|
61 |
vorbis_info *vi; |
a12155461b34
revert r767d3c4153a1 this tremor implementation is buggy
koda
parents:
7697
diff
changeset
|
62 |
|
a12155461b34
revert r767d3c4153a1 this tremor implementation is buggy
koda
parents:
7697
diff
changeset
|
63 |
ogg_int32_t **pcm; |
a12155461b34
revert r767d3c4153a1 this tremor implementation is buggy
koda
parents:
7697
diff
changeset
|
64 |
ogg_int32_t **pcmret; |
a12155461b34
revert r767d3c4153a1 this tremor implementation is buggy
koda
parents:
7697
diff
changeset
|
65 |
int pcm_storage; |
a12155461b34
revert r767d3c4153a1 this tremor implementation is buggy
koda
parents:
7697
diff
changeset
|
66 |
int pcm_current; |
a12155461b34
revert r767d3c4153a1 this tremor implementation is buggy
koda
parents:
7697
diff
changeset
|
67 |
int pcm_returned; |
a12155461b34
revert r767d3c4153a1 this tremor implementation is buggy
koda
parents:
7697
diff
changeset
|
68 |
|
a12155461b34
revert r767d3c4153a1 this tremor implementation is buggy
koda
parents:
7697
diff
changeset
|
69 |
int preextrapolate; |
a12155461b34
revert r767d3c4153a1 this tremor implementation is buggy
koda
parents:
7697
diff
changeset
|
70 |
int eofflag; |
a12155461b34
revert r767d3c4153a1 this tremor implementation is buggy
koda
parents:
7697
diff
changeset
|
71 |
|
a12155461b34
revert r767d3c4153a1 this tremor implementation is buggy
koda
parents:
7697
diff
changeset
|
72 |
long lW; |
a12155461b34
revert r767d3c4153a1 this tremor implementation is buggy
koda
parents:
7697
diff
changeset
|
73 |
long W; |
a12155461b34
revert r767d3c4153a1 this tremor implementation is buggy
koda
parents:
7697
diff
changeset
|
74 |
long nW; |
a12155461b34
revert r767d3c4153a1 this tremor implementation is buggy
koda
parents:
7697
diff
changeset
|
75 |
long centerW; |
a12155461b34
revert r767d3c4153a1 this tremor implementation is buggy
koda
parents:
7697
diff
changeset
|
76 |
|
a12155461b34
revert r767d3c4153a1 this tremor implementation is buggy
koda
parents:
7697
diff
changeset
|
77 |
ogg_int64_t granulepos; |
a12155461b34
revert r767d3c4153a1 this tremor implementation is buggy
koda
parents:
7697
diff
changeset
|
78 |
ogg_int64_t sequence; |
a12155461b34
revert r767d3c4153a1 this tremor implementation is buggy
koda
parents:
7697
diff
changeset
|
79 |
|
a12155461b34
revert r767d3c4153a1 this tremor implementation is buggy
koda
parents:
7697
diff
changeset
|
80 |
void *backend_state; |
a12155461b34
revert r767d3c4153a1 this tremor implementation is buggy
koda
parents:
7697
diff
changeset
|
81 |
} vorbis_dsp_state; |
a12155461b34
revert r767d3c4153a1 this tremor implementation is buggy
koda
parents:
7697
diff
changeset
|
82 |
|
a12155461b34
revert r767d3c4153a1 this tremor implementation is buggy
koda
parents:
7697
diff
changeset
|
83 |
typedef struct vorbis_block{ |
a12155461b34
revert r767d3c4153a1 this tremor implementation is buggy
koda
parents:
7697
diff
changeset
|
84 |
/* necessary stream state for linking to the framing abstraction */ |
a12155461b34
revert r767d3c4153a1 this tremor implementation is buggy
koda
parents:
7697
diff
changeset
|
85 |
ogg_int32_t **pcm; /* this is a pointer into local storage */ |
a12155461b34
revert r767d3c4153a1 this tremor implementation is buggy
koda
parents:
7697
diff
changeset
|
86 |
oggpack_buffer opb; |
a12155461b34
revert r767d3c4153a1 this tremor implementation is buggy
koda
parents:
7697
diff
changeset
|
87 |
|
a12155461b34
revert r767d3c4153a1 this tremor implementation is buggy
koda
parents:
7697
diff
changeset
|
88 |
long lW; |
a12155461b34
revert r767d3c4153a1 this tremor implementation is buggy
koda
parents:
7697
diff
changeset
|
89 |
long W; |
a12155461b34
revert r767d3c4153a1 this tremor implementation is buggy
koda
parents:
7697
diff
changeset
|
90 |
long nW; |
a12155461b34
revert r767d3c4153a1 this tremor implementation is buggy
koda
parents:
7697
diff
changeset
|
91 |
int pcmend; |
a12155461b34
revert r767d3c4153a1 this tremor implementation is buggy
koda
parents:
7697
diff
changeset
|
92 |
int mode; |
a12155461b34
revert r767d3c4153a1 this tremor implementation is buggy
koda
parents:
7697
diff
changeset
|
93 |
|
a12155461b34
revert r767d3c4153a1 this tremor implementation is buggy
koda
parents:
7697
diff
changeset
|
94 |
int eofflag; |
a12155461b34
revert r767d3c4153a1 this tremor implementation is buggy
koda
parents:
7697
diff
changeset
|
95 |
ogg_int64_t granulepos; |
a12155461b34
revert r767d3c4153a1 this tremor implementation is buggy
koda
parents:
7697
diff
changeset
|
96 |
ogg_int64_t sequence; |
a12155461b34
revert r767d3c4153a1 this tremor implementation is buggy
koda
parents:
7697
diff
changeset
|
97 |
vorbis_dsp_state *vd; /* For read-only access of configuration */ |
a12155461b34
revert r767d3c4153a1 this tremor implementation is buggy
koda
parents:
7697
diff
changeset
|
98 |
|
a12155461b34
revert r767d3c4153a1 this tremor implementation is buggy
koda
parents:
7697
diff
changeset
|
99 |
/* local storage to avoid remallocing; it's up to the mapping to |
a12155461b34
revert r767d3c4153a1 this tremor implementation is buggy
koda
parents:
7697
diff
changeset
|
100 |
structure it */ |
a12155461b34
revert r767d3c4153a1 this tremor implementation is buggy
koda
parents:
7697
diff
changeset
|
101 |
void *localstore; |
a12155461b34
revert r767d3c4153a1 this tremor implementation is buggy
koda
parents:
7697
diff
changeset
|
102 |
long localtop; |
a12155461b34
revert r767d3c4153a1 this tremor implementation is buggy
koda
parents:
7697
diff
changeset
|
103 |
long localalloc; |
a12155461b34
revert r767d3c4153a1 this tremor implementation is buggy
koda
parents:
7697
diff
changeset
|
104 |
long totaluse; |
a12155461b34
revert r767d3c4153a1 this tremor implementation is buggy
koda
parents:
7697
diff
changeset
|
105 |
struct alloc_chain *reap; |
a12155461b34
revert r767d3c4153a1 this tremor implementation is buggy
koda
parents:
7697
diff
changeset
|
106 |
|
a12155461b34
revert r767d3c4153a1 this tremor implementation is buggy
koda
parents:
7697
diff
changeset
|
107 |
} vorbis_block; |
a12155461b34
revert r767d3c4153a1 this tremor implementation is buggy
koda
parents:
7697
diff
changeset
|
108 |
|
a12155461b34
revert r767d3c4153a1 this tremor implementation is buggy
koda
parents:
7697
diff
changeset
|
109 |
/* vorbis_block is a single block of data to be processed as part of |
a12155461b34
revert r767d3c4153a1 this tremor implementation is buggy
koda
parents:
7697
diff
changeset
|
110 |
the analysis/synthesis stream; it belongs to a specific logical |
a12155461b34
revert r767d3c4153a1 this tremor implementation is buggy
koda
parents:
7697
diff
changeset
|
111 |
bitstream, but is independant from other vorbis_blocks belonging to |
a12155461b34
revert r767d3c4153a1 this tremor implementation is buggy
koda
parents:
7697
diff
changeset
|
112 |
that logical bitstream. *************************************************/ |
a12155461b34
revert r767d3c4153a1 this tremor implementation is buggy
koda
parents:
7697
diff
changeset
|
113 |
|
a12155461b34
revert r767d3c4153a1 this tremor implementation is buggy
koda
parents:
7697
diff
changeset
|
114 |
struct alloc_chain{ |
a12155461b34
revert r767d3c4153a1 this tremor implementation is buggy
koda
parents:
7697
diff
changeset
|
115 |
void *ptr; |
a12155461b34
revert r767d3c4153a1 this tremor implementation is buggy
koda
parents:
7697
diff
changeset
|
116 |
struct alloc_chain *next; |
a12155461b34
revert r767d3c4153a1 this tremor implementation is buggy
koda
parents:
7697
diff
changeset
|
117 |
}; |
a12155461b34
revert r767d3c4153a1 this tremor implementation is buggy
koda
parents:
7697
diff
changeset
|
118 |
|
a12155461b34
revert r767d3c4153a1 this tremor implementation is buggy
koda
parents:
7697
diff
changeset
|
119 |
/* vorbis_info contains all the setup information specific to the |
a12155461b34
revert r767d3c4153a1 this tremor implementation is buggy
koda
parents:
7697
diff
changeset
|
120 |
specific compression/decompression mode in progress (eg, |
a12155461b34
revert r767d3c4153a1 this tremor implementation is buggy
koda
parents:
7697
diff
changeset
|
121 |
psychoacoustic settings, channel setup, options, codebook |
a12155461b34
revert r767d3c4153a1 this tremor implementation is buggy
koda
parents:
7697
diff
changeset
|
122 |
etc). vorbis_info and substructures are in backends.h. |
a12155461b34
revert r767d3c4153a1 this tremor implementation is buggy
koda
parents:
7697
diff
changeset
|
123 |
*********************************************************************/ |
a12155461b34
revert r767d3c4153a1 this tremor implementation is buggy
koda
parents:
7697
diff
changeset
|
124 |
|
a12155461b34
revert r767d3c4153a1 this tremor implementation is buggy
koda
parents:
7697
diff
changeset
|
125 |
/* the comments are not part of vorbis_info so that vorbis_info can be |
a12155461b34
revert r767d3c4153a1 this tremor implementation is buggy
koda
parents:
7697
diff
changeset
|
126 |
static storage */ |
5170
f7e49eff3708
add libTremor sources (integer-only libvorbis implementation) to repo and ios project
koda
parents:
diff
changeset
|
127 |
typedef struct vorbis_comment{ |
7849
a12155461b34
revert r767d3c4153a1 this tremor implementation is buggy
koda
parents:
7697
diff
changeset
|
128 |
/* unlimited user comment fields. libvorbis writes 'libvorbis' |
a12155461b34
revert r767d3c4153a1 this tremor implementation is buggy
koda
parents:
7697
diff
changeset
|
129 |
whatever vendor is set to in encode */ |
5170
f7e49eff3708
add libTremor sources (integer-only libvorbis implementation) to repo and ios project
koda
parents:
diff
changeset
|
130 |
char **user_comments; |
f7e49eff3708
add libTremor sources (integer-only libvorbis implementation) to repo and ios project
koda
parents:
diff
changeset
|
131 |
int *comment_lengths; |
f7e49eff3708
add libTremor sources (integer-only libvorbis implementation) to repo and ios project
koda
parents:
diff
changeset
|
132 |
int comments; |
f7e49eff3708
add libTremor sources (integer-only libvorbis implementation) to repo and ios project
koda
parents:
diff
changeset
|
133 |
char *vendor; |
f7e49eff3708
add libTremor sources (integer-only libvorbis implementation) to repo and ios project
koda
parents:
diff
changeset
|
134 |
|
f7e49eff3708
add libTremor sources (integer-only libvorbis implementation) to repo and ios project
koda
parents:
diff
changeset
|
135 |
} vorbis_comment; |
f7e49eff3708
add libTremor sources (integer-only libvorbis implementation) to repo and ios project
koda
parents:
diff
changeset
|
136 |
|
f7e49eff3708
add libTremor sources (integer-only libvorbis implementation) to repo and ios project
koda
parents:
diff
changeset
|
137 |
|
7849
a12155461b34
revert r767d3c4153a1 this tremor implementation is buggy
koda
parents:
7697
diff
changeset
|
138 |
/* libvorbis encodes in two abstraction layers; first we perform DSP |
a12155461b34
revert r767d3c4153a1 this tremor implementation is buggy
koda
parents:
7697
diff
changeset
|
139 |
and produce a packet (see docs/analysis.txt). The packet is then |
a12155461b34
revert r767d3c4153a1 this tremor implementation is buggy
koda
parents:
7697
diff
changeset
|
140 |
coded into a framed OggSquish bitstream by the second layer (see |
a12155461b34
revert r767d3c4153a1 this tremor implementation is buggy
koda
parents:
7697
diff
changeset
|
141 |
docs/framing.txt). Decode is the reverse process; we sync/frame |
a12155461b34
revert r767d3c4153a1 this tremor implementation is buggy
koda
parents:
7697
diff
changeset
|
142 |
the bitstream and extract individual packets, then decode the |
a12155461b34
revert r767d3c4153a1 this tremor implementation is buggy
koda
parents:
7697
diff
changeset
|
143 |
packet back into PCM audio. |
a12155461b34
revert r767d3c4153a1 this tremor implementation is buggy
koda
parents:
7697
diff
changeset
|
144 |
|
a12155461b34
revert r767d3c4153a1 this tremor implementation is buggy
koda
parents:
7697
diff
changeset
|
145 |
The extra framing/packetizing is used in streaming formats, such as |
a12155461b34
revert r767d3c4153a1 this tremor implementation is buggy
koda
parents:
7697
diff
changeset
|
146 |
files. Over the net (such as with UDP), the framing and |
a12155461b34
revert r767d3c4153a1 this tremor implementation is buggy
koda
parents:
7697
diff
changeset
|
147 |
packetization aren't necessary as they're provided by the transport |
a12155461b34
revert r767d3c4153a1 this tremor implementation is buggy
koda
parents:
7697
diff
changeset
|
148 |
and the streaming layer is not used */ |
a12155461b34
revert r767d3c4153a1 this tremor implementation is buggy
koda
parents:
7697
diff
changeset
|
149 |
|
5170
f7e49eff3708
add libTremor sources (integer-only libvorbis implementation) to repo and ios project
koda
parents:
diff
changeset
|
150 |
/* Vorbis PRIMITIVES: general ***************************************/ |
f7e49eff3708
add libTremor sources (integer-only libvorbis implementation) to repo and ios project
koda
parents:
diff
changeset
|
151 |
|
f7e49eff3708
add libTremor sources (integer-only libvorbis implementation) to repo and ios project
koda
parents:
diff
changeset
|
152 |
extern void vorbis_info_init(vorbis_info *vi); |
f7e49eff3708
add libTremor sources (integer-only libvorbis implementation) to repo and ios project
koda
parents:
diff
changeset
|
153 |
extern void vorbis_info_clear(vorbis_info *vi); |
f7e49eff3708
add libTremor sources (integer-only libvorbis implementation) to repo and ios project
koda
parents:
diff
changeset
|
154 |
extern int vorbis_info_blocksize(vorbis_info *vi,int zo); |
f7e49eff3708
add libTremor sources (integer-only libvorbis implementation) to repo and ios project
koda
parents:
diff
changeset
|
155 |
extern void vorbis_comment_init(vorbis_comment *vc); |
f7e49eff3708
add libTremor sources (integer-only libvorbis implementation) to repo and ios project
koda
parents:
diff
changeset
|
156 |
extern void vorbis_comment_add(vorbis_comment *vc, char *comment); |
f7e49eff3708
add libTremor sources (integer-only libvorbis implementation) to repo and ios project
koda
parents:
diff
changeset
|
157 |
extern void vorbis_comment_add_tag(vorbis_comment *vc, |
f7e49eff3708
add libTremor sources (integer-only libvorbis implementation) to repo and ios project
koda
parents:
diff
changeset
|
158 |
char *tag, char *contents); |
f7e49eff3708
add libTremor sources (integer-only libvorbis implementation) to repo and ios project
koda
parents:
diff
changeset
|
159 |
extern char *vorbis_comment_query(vorbis_comment *vc, char *tag, int count); |
f7e49eff3708
add libTremor sources (integer-only libvorbis implementation) to repo and ios project
koda
parents:
diff
changeset
|
160 |
extern int vorbis_comment_query_count(vorbis_comment *vc, char *tag); |
f7e49eff3708
add libTremor sources (integer-only libvorbis implementation) to repo and ios project
koda
parents:
diff
changeset
|
161 |
extern void vorbis_comment_clear(vorbis_comment *vc); |
f7e49eff3708
add libTremor sources (integer-only libvorbis implementation) to repo and ios project
koda
parents:
diff
changeset
|
162 |
|
7849
a12155461b34
revert r767d3c4153a1 this tremor implementation is buggy
koda
parents:
7697
diff
changeset
|
163 |
extern int vorbis_block_init(vorbis_dsp_state *v, vorbis_block *vb); |
a12155461b34
revert r767d3c4153a1 this tremor implementation is buggy
koda
parents:
7697
diff
changeset
|
164 |
extern int vorbis_block_clear(vorbis_block *vb); |
a12155461b34
revert r767d3c4153a1 this tremor implementation is buggy
koda
parents:
7697
diff
changeset
|
165 |
extern void vorbis_dsp_clear(vorbis_dsp_state *v); |
a12155461b34
revert r767d3c4153a1 this tremor implementation is buggy
koda
parents:
7697
diff
changeset
|
166 |
|
a12155461b34
revert r767d3c4153a1 this tremor implementation is buggy
koda
parents:
7697
diff
changeset
|
167 |
/* Vorbis PRIMITIVES: synthesis layer *******************************/ |
a12155461b34
revert r767d3c4153a1 this tremor implementation is buggy
koda
parents:
7697
diff
changeset
|
168 |
extern int vorbis_synthesis_headerin(vorbis_info *vi,vorbis_comment *vc, |
a12155461b34
revert r767d3c4153a1 this tremor implementation is buggy
koda
parents:
7697
diff
changeset
|
169 |
ogg_packet *op); |
a12155461b34
revert r767d3c4153a1 this tremor implementation is buggy
koda
parents:
7697
diff
changeset
|
170 |
|
a12155461b34
revert r767d3c4153a1 this tremor implementation is buggy
koda
parents:
7697
diff
changeset
|
171 |
extern int vorbis_synthesis_init(vorbis_dsp_state *v,vorbis_info *vi); |
a12155461b34
revert r767d3c4153a1 this tremor implementation is buggy
koda
parents:
7697
diff
changeset
|
172 |
extern int vorbis_synthesis_restart(vorbis_dsp_state *v); |
a12155461b34
revert r767d3c4153a1 this tremor implementation is buggy
koda
parents:
7697
diff
changeset
|
173 |
extern int vorbis_synthesis(vorbis_block *vb,ogg_packet *op,int decodep); |
a12155461b34
revert r767d3c4153a1 this tremor implementation is buggy
koda
parents:
7697
diff
changeset
|
174 |
extern int vorbis_synthesis_blockin(vorbis_dsp_state *v,vorbis_block *vb); |
a12155461b34
revert r767d3c4153a1 this tremor implementation is buggy
koda
parents:
7697
diff
changeset
|
175 |
extern int vorbis_synthesis_pcmout(vorbis_dsp_state *v,ogg_int32_t ***pcm); |
a12155461b34
revert r767d3c4153a1 this tremor implementation is buggy
koda
parents:
7697
diff
changeset
|
176 |
extern int vorbis_synthesis_read(vorbis_dsp_state *v,int samples); |
a12155461b34
revert r767d3c4153a1 this tremor implementation is buggy
koda
parents:
7697
diff
changeset
|
177 |
extern long vorbis_packet_blocksize(vorbis_info *vi,ogg_packet *op); |
a12155461b34
revert r767d3c4153a1 this tremor implementation is buggy
koda
parents:
7697
diff
changeset
|
178 |
|
5170
f7e49eff3708
add libTremor sources (integer-only libvorbis implementation) to repo and ios project
koda
parents:
diff
changeset
|
179 |
/* Vorbis ERRORS and return codes ***********************************/ |
f7e49eff3708
add libTremor sources (integer-only libvorbis implementation) to repo and ios project
koda
parents:
diff
changeset
|
180 |
|
f7e49eff3708
add libTremor sources (integer-only libvorbis implementation) to repo and ios project
koda
parents:
diff
changeset
|
181 |
#define OV_FALSE -1 |
f7e49eff3708
add libTremor sources (integer-only libvorbis implementation) to repo and ios project
koda
parents:
diff
changeset
|
182 |
#define OV_EOF -2 |
f7e49eff3708
add libTremor sources (integer-only libvorbis implementation) to repo and ios project
koda
parents:
diff
changeset
|
183 |
#define OV_HOLE -3 |
f7e49eff3708
add libTremor sources (integer-only libvorbis implementation) to repo and ios project
koda
parents:
diff
changeset
|
184 |
|
f7e49eff3708
add libTremor sources (integer-only libvorbis implementation) to repo and ios project
koda
parents:
diff
changeset
|
185 |
#define OV_EREAD -128 |
f7e49eff3708
add libTremor sources (integer-only libvorbis implementation) to repo and ios project
koda
parents:
diff
changeset
|
186 |
#define OV_EFAULT -129 |
f7e49eff3708
add libTremor sources (integer-only libvorbis implementation) to repo and ios project
koda
parents:
diff
changeset
|
187 |
#define OV_EIMPL -130 |
f7e49eff3708
add libTremor sources (integer-only libvorbis implementation) to repo and ios project
koda
parents:
diff
changeset
|
188 |
#define OV_EINVAL -131 |
f7e49eff3708
add libTremor sources (integer-only libvorbis implementation) to repo and ios project
koda
parents:
diff
changeset
|
189 |
#define OV_ENOTVORBIS -132 |
f7e49eff3708
add libTremor sources (integer-only libvorbis implementation) to repo and ios project
koda
parents:
diff
changeset
|
190 |
#define OV_EBADHEADER -133 |
f7e49eff3708
add libTremor sources (integer-only libvorbis implementation) to repo and ios project
koda
parents:
diff
changeset
|
191 |
#define OV_EVERSION -134 |
f7e49eff3708
add libTremor sources (integer-only libvorbis implementation) to repo and ios project
koda
parents:
diff
changeset
|
192 |
#define OV_ENOTAUDIO -135 |
f7e49eff3708
add libTremor sources (integer-only libvorbis implementation) to repo and ios project
koda
parents:
diff
changeset
|
193 |
#define OV_EBADPACKET -136 |
f7e49eff3708
add libTremor sources (integer-only libvorbis implementation) to repo and ios project
koda
parents:
diff
changeset
|
194 |
#define OV_EBADLINK -137 |
f7e49eff3708
add libTremor sources (integer-only libvorbis implementation) to repo and ios project
koda
parents:
diff
changeset
|
195 |
#define OV_ENOSEEK -138 |
f7e49eff3708
add libTremor sources (integer-only libvorbis implementation) to repo and ios project
koda
parents:
diff
changeset
|
196 |
|
f7e49eff3708
add libTremor sources (integer-only libvorbis implementation) to repo and ios project
koda
parents:
diff
changeset
|
197 |
#ifdef __cplusplus |
f7e49eff3708
add libTremor sources (integer-only libvorbis implementation) to repo and ios project
koda
parents:
diff
changeset
|
198 |
} |
f7e49eff3708
add libTremor sources (integer-only libvorbis implementation) to repo and ios project
koda
parents:
diff
changeset
|
199 |
#endif /* __cplusplus */ |
f7e49eff3708
add libTremor sources (integer-only libvorbis implementation) to repo and ios project
koda
parents:
diff
changeset
|
200 |
|
f7e49eff3708
add libTremor sources (integer-only libvorbis implementation) to repo and ios project
koda
parents:
diff
changeset
|
201 |
#endif |
f7e49eff3708
add libTremor sources (integer-only libvorbis implementation) to repo and ios project
koda
parents:
diff
changeset
|
202 |