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);
return fseek(f,off,whence);
}
-static int _ov_open1(void *f,OggVorbis_File *vf,char *initial,
+static int _ov_open1(void *f,OggVorbis_File *vf,const char *initial,
long ibytes, ov_callbacks callbacks){
int offsettest=((f && callbacks.seek_func)?callbacks.seek_func(f,0,SEEK_CUR):-1);
long *serialno_list=NULL;
0) OK
*/
-int ov_open_callbacks(void *f,OggVorbis_File *vf,char *initial,long ibytes,
- ov_callbacks callbacks){
+int ov_open_callbacks(void *f,OggVorbis_File *vf,
+ const char *initial,long ibytes,ov_callbacks callbacks){
int ret=_ov_open1(f,vf,initial,ibytes,callbacks);
if(ret)return ret;
return _ov_open2(vf);
}
-int ov_open(FILE *f,OggVorbis_File *vf,char *initial,long ibytes){
+int ov_open(FILE *f,OggVorbis_File *vf,const char *initial,long ibytes){
ov_callbacks callbacks = {
(size_t (*)(void *, size_t, size_t, void *)) fread,
(int (*)(void *, ogg_int64_t, int)) _fseek64_wrap,
return ov_open_callbacks((void *)f, vf, initial, ibytes, callbacks);
}
-int ov_fopen(char *path,OggVorbis_File *vf){
+int ov_fopen(const char *path,OggVorbis_File *vf){
int ret;
FILE *f = fopen(path,"rb");
if(!f) return -1;
seekability). Use ov_test_open to finish opening the file, else
ov_clear to close/free it. Same return codes as open. */
-int ov_test_callbacks(void *f,OggVorbis_File *vf,char *initial,long ibytes,
- ov_callbacks callbacks)
+int ov_test_callbacks(void *f,OggVorbis_File *vf,
+ const char *initial,long ibytes,ov_callbacks callbacks)
{
return _ov_open1(f,vf,initial,ibytes,callbacks);
}
-int ov_test(FILE *f,OggVorbis_File *vf,char *initial,long ibytes){
+int ov_test(FILE *f,OggVorbis_File *vf,const char *initial,long ibytes){
ov_callbacks callbacks = {
(size_t (*)(void *, size_t, size_t, void *)) fread,
(int (*)(void *, ogg_int64_t, int)) _fseek64_wrap,