/
0100-exports.patch
236 lines (212 loc) · 12.7 KB
/
0100-exports.patch
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
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
apply this only when needed to control the exported functions.
* unix/osx builds: make sure to add -fvisibility=hidden to CFLAGS
--- libvorbis/lib/block.c.orig
+++ libvorbis/lib/block.c
@@ -1035,7 +1035,7 @@
}
-const float *vorbis_window(vorbis_dsp_state *v,int W){
+VORBIS_EXPORT const float *vorbis_window(vorbis_dsp_state *v,int W){
vorbis_info *vi=v->vi;
codec_setup_info *ci=vi->codec_setup;
int hs=ci->halfrate_flag;
--- libvorbis/lib/vorbisfile.c.orig
+++ libvorbis/lib/vorbisfile.c
@@ -2141,7 +2141,7 @@
}
}
-extern const float *vorbis_window(vorbis_dsp_state *v,int W);
+VORBIS_IMPORT extern const float *vorbis_window(vorbis_dsp_state *v,int W);
static void _ov_splice(float **pcm,float **lappcm,
int n1, int n2,
--- libvorbis/include/vorbis/codec.h.orig
+++ libvorbis/include/vorbis/codec.h
@@ -161,60 +161,71 @@
/* Vorbis PRIMITIVES: general ***************************************/
-extern void vorbis_info_init(vorbis_info *vi);
-extern void vorbis_info_clear(vorbis_info *vi);
-extern int vorbis_info_blocksize(vorbis_info *vi,int zo);
-extern void vorbis_comment_init(vorbis_comment *vc);
-extern void vorbis_comment_add(vorbis_comment *vc, const char *comment);
-extern void vorbis_comment_add_tag(vorbis_comment *vc,
+#if defined(_WIN32) || defined(__CYGWIN__)
+# define VORBIS_EXPORT __declspec(dllexport)
+# define VORBIS_IMPORT __declspec(dllimport)
+#elif defined(__OS2__) && defined(__WATCOMC__)
+# define VORBIS_EXPORT __declspec(dllexport)
+# define VORBIS_IMPORT
+#else
+# define VORBIS_EXPORT __attribute__((visibility("default")))
+# define VORBIS_IMPORT
+#endif
+
+VORBIS_EXPORT extern void vorbis_info_init(vorbis_info *vi);
+VORBIS_EXPORT extern void vorbis_info_clear(vorbis_info *vi);
+VORBIS_EXPORT extern int vorbis_info_blocksize(vorbis_info *vi,int zo);
+VORBIS_EXPORT extern void vorbis_comment_init(vorbis_comment *vc);
+VORBIS_EXPORT extern void vorbis_comment_add(vorbis_comment *vc, const char *comment);
+VORBIS_EXPORT extern void vorbis_comment_add_tag(vorbis_comment *vc,
const char *tag, const char *contents);
-extern char *vorbis_comment_query(vorbis_comment *vc, const char *tag, int count);
-extern int vorbis_comment_query_count(vorbis_comment *vc, const char *tag);
-extern void vorbis_comment_clear(vorbis_comment *vc);
-
-extern int vorbis_block_init(vorbis_dsp_state *v, vorbis_block *vb);
-extern int vorbis_block_clear(vorbis_block *vb);
-extern void vorbis_dsp_clear(vorbis_dsp_state *v);
-extern double vorbis_granule_time(vorbis_dsp_state *v,
+VORBIS_EXPORT extern char *vorbis_comment_query(vorbis_comment *vc, const char *tag, int count);
+VORBIS_EXPORT extern int vorbis_comment_query_count(vorbis_comment *vc, const char *tag);
+VORBIS_EXPORT extern void vorbis_comment_clear(vorbis_comment *vc);
+
+VORBIS_EXPORT extern int vorbis_block_init(vorbis_dsp_state *v, vorbis_block *vb);
+VORBIS_EXPORT extern int vorbis_block_clear(vorbis_block *vb);
+VORBIS_EXPORT extern void vorbis_dsp_clear(vorbis_dsp_state *v);
+VORBIS_EXPORT extern double vorbis_granule_time(vorbis_dsp_state *v,
ogg_int64_t granulepos);
-extern const char *vorbis_version_string(void);
+VORBIS_EXPORT extern const char *vorbis_version_string(void);
/* Vorbis PRIMITIVES: analysis/DSP layer ****************************/
-extern int vorbis_analysis_init(vorbis_dsp_state *v,vorbis_info *vi);
-extern int vorbis_commentheader_out(vorbis_comment *vc, ogg_packet *op);
-extern int vorbis_analysis_headerout(vorbis_dsp_state *v,
+VORBIS_EXPORT extern int vorbis_analysis_init(vorbis_dsp_state *v,vorbis_info *vi);
+VORBIS_EXPORT extern int vorbis_commentheader_out(vorbis_comment *vc, ogg_packet *op);
+VORBIS_EXPORT extern int vorbis_analysis_headerout(vorbis_dsp_state *v,
vorbis_comment *vc,
ogg_packet *op,
ogg_packet *op_comm,
ogg_packet *op_code);
-extern float **vorbis_analysis_buffer(vorbis_dsp_state *v,int vals);
-extern int vorbis_analysis_wrote(vorbis_dsp_state *v,int vals);
-extern int vorbis_analysis_blockout(vorbis_dsp_state *v,vorbis_block *vb);
-extern int vorbis_analysis(vorbis_block *vb,ogg_packet *op);
+VORBIS_EXPORT extern float **vorbis_analysis_buffer(vorbis_dsp_state *v,int vals);
+VORBIS_EXPORT extern int vorbis_analysis_wrote(vorbis_dsp_state *v,int vals);
+VORBIS_EXPORT extern int vorbis_analysis_blockout(vorbis_dsp_state *v,vorbis_block *vb);
+VORBIS_EXPORT extern int vorbis_analysis(vorbis_block *vb,ogg_packet *op);
-extern int vorbis_bitrate_addblock(vorbis_block *vb);
-extern int vorbis_bitrate_flushpacket(vorbis_dsp_state *vd,
+VORBIS_EXPORT extern int vorbis_bitrate_addblock(vorbis_block *vb);
+VORBIS_EXPORT extern int vorbis_bitrate_flushpacket(vorbis_dsp_state *vd,
ogg_packet *op);
/* Vorbis PRIMITIVES: synthesis layer *******************************/
-extern int vorbis_synthesis_idheader(ogg_packet *op);
-extern int vorbis_synthesis_headerin(vorbis_info *vi,vorbis_comment *vc,
+VORBIS_EXPORT extern int vorbis_synthesis_idheader(ogg_packet *op);
+VORBIS_EXPORT extern int vorbis_synthesis_headerin(vorbis_info *vi,vorbis_comment *vc,
ogg_packet *op);
-extern int vorbis_synthesis_init(vorbis_dsp_state *v,vorbis_info *vi);
-extern int vorbis_synthesis_restart(vorbis_dsp_state *v);
-extern int vorbis_synthesis(vorbis_block *vb,ogg_packet *op);
-extern int vorbis_synthesis_trackonly(vorbis_block *vb,ogg_packet *op);
-extern int vorbis_synthesis_blockin(vorbis_dsp_state *v,vorbis_block *vb);
-extern int vorbis_synthesis_pcmout(vorbis_dsp_state *v,float ***pcm);
-extern int vorbis_synthesis_lapout(vorbis_dsp_state *v,float ***pcm);
-extern int vorbis_synthesis_read(vorbis_dsp_state *v,int samples);
-extern long vorbis_packet_blocksize(vorbis_info *vi,ogg_packet *op);
+VORBIS_EXPORT extern int vorbis_synthesis_init(vorbis_dsp_state *v,vorbis_info *vi);
+VORBIS_EXPORT extern int vorbis_synthesis_restart(vorbis_dsp_state *v);
+VORBIS_EXPORT extern int vorbis_synthesis(vorbis_block *vb,ogg_packet *op);
+VORBIS_EXPORT extern int vorbis_synthesis_trackonly(vorbis_block *vb,ogg_packet *op);
+VORBIS_EXPORT extern int vorbis_synthesis_blockin(vorbis_dsp_state *v,vorbis_block *vb);
+VORBIS_EXPORT extern int vorbis_synthesis_pcmout(vorbis_dsp_state *v,float ***pcm);
+VORBIS_EXPORT extern int vorbis_synthesis_lapout(vorbis_dsp_state *v,float ***pcm);
+VORBIS_EXPORT extern int vorbis_synthesis_read(vorbis_dsp_state *v,int samples);
+VORBIS_EXPORT extern long vorbis_packet_blocksize(vorbis_info *vi,ogg_packet *op);
-extern int vorbis_synthesis_halfrate(vorbis_info *v,int flag);
-extern int vorbis_synthesis_halfrate_p(vorbis_info *v);
+VORBIS_EXPORT extern int vorbis_synthesis_halfrate(vorbis_info *v,int flag);
+VORBIS_EXPORT extern int vorbis_synthesis_halfrate_p(vorbis_info *v);
/* Vorbis ERRORS and return codes ***********************************/
--- libvorbis/include/vorbis/vorbisfile.h.orig
+++ libvorbis/include/vorbis/vorbisfile.h
@@ -145,57 +145,57 @@
} OggVorbis_File;
-extern int ov_clear(OggVorbis_File *vf);
-extern int ov_fopen(const char *path,OggVorbis_File *vf);
-extern int ov_open(FILE *f,OggVorbis_File *vf,const char *initial,long ibytes);
-extern int ov_open_callbacks(void *datasource, OggVorbis_File *vf,
+VORBIS_EXPORT extern int ov_clear(OggVorbis_File *vf);
+VORBIS_EXPORT extern int ov_fopen(const char *path,OggVorbis_File *vf);
+VORBIS_EXPORT extern int ov_open(FILE *f,OggVorbis_File *vf,const char *initial,long ibytes);
+VORBIS_EXPORT extern int ov_open_callbacks(void *datasource, OggVorbis_File *vf,
const char *initial, long ibytes, ov_callbacks callbacks);
-extern int ov_test(FILE *f,OggVorbis_File *vf,const char *initial,long ibytes);
-extern int ov_test_callbacks(void *datasource, OggVorbis_File *vf,
+VORBIS_EXPORT extern int ov_test(FILE *f,OggVorbis_File *vf,const char *initial,long ibytes);
+VORBIS_EXPORT extern int ov_test_callbacks(void *datasource, OggVorbis_File *vf,
const char *initial, long ibytes, ov_callbacks callbacks);
-extern int ov_test_open(OggVorbis_File *vf);
+VORBIS_EXPORT extern int ov_test_open(OggVorbis_File *vf);
-extern long ov_bitrate(OggVorbis_File *vf,int i);
-extern long ov_bitrate_instant(OggVorbis_File *vf);
-extern long ov_streams(OggVorbis_File *vf);
-extern long ov_seekable(OggVorbis_File *vf);
-extern long ov_serialnumber(OggVorbis_File *vf,int i);
-
-extern ogg_int64_t ov_raw_total(OggVorbis_File *vf,int i);
-extern ogg_int64_t ov_pcm_total(OggVorbis_File *vf,int i);
-extern double ov_time_total(OggVorbis_File *vf,int i);
-
-extern int ov_raw_seek(OggVorbis_File *vf,ogg_int64_t pos);
-extern int ov_pcm_seek(OggVorbis_File *vf,ogg_int64_t pos);
-extern int ov_pcm_seek_page(OggVorbis_File *vf,ogg_int64_t pos);
-extern int ov_time_seek(OggVorbis_File *vf,double pos);
-extern int ov_time_seek_page(OggVorbis_File *vf,double pos);
-
-extern int ov_raw_seek_lap(OggVorbis_File *vf,ogg_int64_t pos);
-extern int ov_pcm_seek_lap(OggVorbis_File *vf,ogg_int64_t pos);
-extern int ov_pcm_seek_page_lap(OggVorbis_File *vf,ogg_int64_t pos);
-extern int ov_time_seek_lap(OggVorbis_File *vf,double pos);
-extern int ov_time_seek_page_lap(OggVorbis_File *vf,double pos);
-
-extern ogg_int64_t ov_raw_tell(OggVorbis_File *vf);
-extern ogg_int64_t ov_pcm_tell(OggVorbis_File *vf);
-extern double ov_time_tell(OggVorbis_File *vf);
+VORBIS_EXPORT extern long ov_bitrate(OggVorbis_File *vf,int i);
+VORBIS_EXPORT extern long ov_bitrate_instant(OggVorbis_File *vf);
+VORBIS_EXPORT extern long ov_streams(OggVorbis_File *vf);
+VORBIS_EXPORT extern long ov_seekable(OggVorbis_File *vf);
+VORBIS_EXPORT extern long ov_serialnumber(OggVorbis_File *vf,int i);
+
+VORBIS_EXPORT extern ogg_int64_t ov_raw_total(OggVorbis_File *vf,int i);
+VORBIS_EXPORT extern ogg_int64_t ov_pcm_total(OggVorbis_File *vf,int i);
+VORBIS_EXPORT extern double ov_time_total(OggVorbis_File *vf,int i);
+
+VORBIS_EXPORT extern int ov_raw_seek(OggVorbis_File *vf,ogg_int64_t pos);
+VORBIS_EXPORT extern int ov_pcm_seek(OggVorbis_File *vf,ogg_int64_t pos);
+VORBIS_EXPORT extern int ov_pcm_seek_page(OggVorbis_File *vf,ogg_int64_t pos);
+VORBIS_EXPORT extern int ov_time_seek(OggVorbis_File *vf,double pos);
+VORBIS_EXPORT extern int ov_time_seek_page(OggVorbis_File *vf,double pos);
+
+VORBIS_EXPORT extern int ov_raw_seek_lap(OggVorbis_File *vf,ogg_int64_t pos);
+VORBIS_EXPORT extern int ov_pcm_seek_lap(OggVorbis_File *vf,ogg_int64_t pos);
+VORBIS_EXPORT extern int ov_pcm_seek_page_lap(OggVorbis_File *vf,ogg_int64_t pos);
+VORBIS_EXPORT extern int ov_time_seek_lap(OggVorbis_File *vf,double pos);
+VORBIS_EXPORT extern int ov_time_seek_page_lap(OggVorbis_File *vf,double pos);
+
+VORBIS_EXPORT extern ogg_int64_t ov_raw_tell(OggVorbis_File *vf);
+VORBIS_EXPORT extern ogg_int64_t ov_pcm_tell(OggVorbis_File *vf);
+VORBIS_EXPORT extern double ov_time_tell(OggVorbis_File *vf);
-extern vorbis_info *ov_info(OggVorbis_File *vf,int link);
-extern vorbis_comment *ov_comment(OggVorbis_File *vf,int link);
+VORBIS_EXPORT extern vorbis_info *ov_info(OggVorbis_File *vf,int link);
+VORBIS_EXPORT extern vorbis_comment *ov_comment(OggVorbis_File *vf,int link);
-extern long ov_read_float(OggVorbis_File *vf,float ***pcm_channels,int samples,
+VORBIS_EXPORT extern long ov_read_float(OggVorbis_File *vf,float ***pcm_channels,int samples,
int *bitstream);
-extern long ov_read_filter(OggVorbis_File *vf,char *buffer,int length,
+VORBIS_EXPORT extern long ov_read_filter(OggVorbis_File *vf,char *buffer,int length,
int bigendianp,int word,int sgned,int *bitstream,
void (*filter)(float **pcm,long channels,long samples,void *filter_param),void *filter_param);
-extern long ov_read(OggVorbis_File *vf,char *buffer,int length,
+VORBIS_EXPORT extern long ov_read(OggVorbis_File *vf,char *buffer,int length,
int bigendianp,int word,int sgned,int *bitstream);
-extern int ov_crosslap(OggVorbis_File *vf1,OggVorbis_File *vf2);
+VORBIS_EXPORT extern int ov_crosslap(OggVorbis_File *vf1,OggVorbis_File *vf2);
-extern int ov_halfrate(OggVorbis_File *vf,int flag);
-extern int ov_halfrate_p(OggVorbis_File *vf);
+VORBIS_EXPORT extern int ov_halfrate(OggVorbis_File *vf,int flag);
+VORBIS_EXPORT extern int ov_halfrate_p(OggVorbis_File *vf);
#ifdef __cplusplus
}