pkg-config: Only append -lm if necessary.
[platform/upstream/libvorbis.git] / include / vorbis / vorbisfile.h
index e128fe8..5662611 100644 (file)
@@ -11,7 +11,6 @@
  ********************************************************************
 
  function: stdio-based convenience library for opening/seeking/decoding
- last mod: $Id$
 
  ********************************************************************/
 
@@ -43,9 +42,11 @@ typedef struct {
   long   (*tell_func)  (void *datasource);
 } ov_callbacks;
 
+#ifndef OV_EXCLUDE_STATIC_CALLBACKS
+
 /* a few sets of convenient callbacks, especially for use under
  * Windows where ov_open_callbacks() should always be used instead of
- * ov_open() to avoid problems with incompatable crt.o version linking
+ * ov_open() to avoid problems with incompatible crt.o version linking
  * issues. */
 
 static int _ov_header_fseek_wrap(FILE *f,ogg_int64_t off,int whence){
@@ -63,10 +64,11 @@ static int _ov_header_fseek_wrap(FILE *f,ogg_int64_t off,int whence){
 /* These structs below (OV_CALLBACKS_DEFAULT etc) are defined here as
  * static data. That means that every file which includes this header
  * will get its own copy of these structs whether it uses them or
- * not. This is essential on platforms such as Windows on which
- * several different versions of stdio support may be linked to by
- * different DLLs, and we need to be certain we know which one we're
- * using (the same one as the main application).
+ * not unless it #defines OV_EXCLUDE_STATIC_CALLBACKS.
+ * These static symbols are essential on platforms such as Windows on
+ * which several different versions of stdio support may be linked to
+ * by different DLLs, and we need to be certain we know which one
+ * we're using (the same one as the main application).
  */
 
 static ov_callbacks OV_CALLBACKS_DEFAULT = {
@@ -97,6 +99,8 @@ static ov_callbacks OV_CALLBACKS_STREAMONLY_NOCLOSE = {
   (long (*)(void *))                            NULL
 };
 
+#endif
+
 #define  NOTOPEN   0
 #define  PARTOPEN  1
 #define  OPENED    2
@@ -117,8 +121,8 @@ typedef struct OggVorbis_File {
   ogg_int64_t     *dataoffsets;
   long            *serialnos;
   ogg_int64_t     *pcmlengths; /* overloaded to maintain binary
-                                 compatability; x2 size, stores both
-                                 beginning and end values */
+                                  compatibility; x2 size, stores both
+                                  beginning and end values */
   vorbis_info     *vi;
   vorbis_comment  *vc;
 
@@ -142,14 +146,14 @@ typedef struct OggVorbis_File {
 
 
 extern int ov_clear(OggVorbis_File *vf);
-extern int ov_fopen(char *path,OggVorbis_File *vf);
-extern int ov_open(FILE *f,OggVorbis_File *vf,char *initial,long ibytes);
+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,
-               char *initial, long ibytes, ov_callbacks callbacks);
+                const char *initial, long ibytes, ov_callbacks callbacks);
 
-extern int ov_test(FILE *f,OggVorbis_File *vf,char *initial,long ibytes);
+extern int ov_test(FILE *f,OggVorbis_File *vf,const char *initial,long ibytes);
 extern int ov_test_callbacks(void *datasource, OggVorbis_File *vf,
-               char *initial, long ibytes, ov_callbacks callbacks);
+                const char *initial, long ibytes, ov_callbacks callbacks);
 extern int ov_test_open(OggVorbis_File *vf);
 
 extern long ov_bitrate(OggVorbis_File *vf,int i);
@@ -182,12 +186,12 @@ extern vorbis_info *ov_info(OggVorbis_File *vf,int link);
 extern vorbis_comment *ov_comment(OggVorbis_File *vf,int link);
 
 extern long ov_read_float(OggVorbis_File *vf,float ***pcm_channels,int samples,
-                         int *bitstream);
+                          int *bitstream);
 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);
+                          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,
-                   int bigendianp,int word,int sgned,int *bitstream);
+                    int bigendianp,int word,int sgned,int *bitstream);
 extern int ov_crosslap(OggVorbis_File *vf1,OggVorbis_File *vf2);
 
 extern int ov_halfrate(OggVorbis_File *vf,int flag);