| 1 | /******************************************************************** |
| 2 | * * |
| 3 | * THIS FILE IS PART OF THE OggVorbis SOFTWARE CODEC SOURCE CODE. * |
| 4 | * USE, DISTRIBUTION AND REPRODUCTION OF THIS LIBRARY SOURCE IS * |
| 5 | * GOVERNED BY A BSD-STYLE SOURCE LICENSE INCLUDED WITH THIS SOURCE * |
| 6 | * IN 'COPYING'. PLEASE READ THESE TERMS BEFORE DISTRIBUTING. * |
| 7 | * * |
| 8 | * THE OggVorbis SOURCE CODE IS (C) COPYRIGHT 1994-2007 * |
| 9 | * by the Xiph.Org Foundation https://xiph.org/ * |
| 10 | * * |
| 11 | ******************************************************************** |
| 12 | |
| 13 | function: stdio-based convenience library for opening/seeking/decoding |
| 14 | |
| 15 | ********************************************************************/ |
| 16 | |
| 17 | #ifndef _vorbisfile_h_ |
| 18 | #define _vorbisfile_h_cxx . . $ `external/vorbis/vorbisfile.h:18:9`! |
| 19 | |
| 20 | #include "vorbis_codec.h"cxx . . $ `<file>/external/vorbis/vorbis_codec.h`/ |
| 21 | |
| 22 | /* The function prototypes for the callbacks are basically the same as for |
| 23 | * the stdio functions fread, fseek, fclose, ftell. |
| 24 | * The one difference is that the FILE * arguments have been replaced with |
| 25 | * a void * - this is to be used as a pointer to whatever internal data these |
| 26 | * functions might need. In the stdio case, it's just a FILE * cast to a void * |
| 27 | * |
| 28 | * If you use other functions, check the docs for these functions and return |
| 29 | * the right values. For seek_func(), you *MUST* return -1 if the stream is |
| 30 | * unseekable |
| 31 | */ |
| 32 | typedef structcxx . . $ $anonymous_type_611a44db95ee9eb6_0# { |
| 33 | size_t (*read_funccxx . . $ $anonymous_type_611a44db95ee9eb6_0#read_func.) (void *ptr, size_t size, size_t nmemb, void *datasource); |
| 34 | int (*seek_funccxx . . $ $anonymous_type_611a44db95ee9eb6_0#seek_func.) (void *datasource, ogg_int64_tcxx . . $ ogg_int64_t# offset, int whence); |
| 35 | int (*close_funccxx . . $ $anonymous_type_611a44db95ee9eb6_0#close_func.) (void *datasource); |
| 36 | long (*tell_funccxx . . $ $anonymous_type_611a44db95ee9eb6_0#tell_func.) (void *datasource); |
| 37 | } ov_callbackscxx . . $ ov_callbacks#; |
| 38 | |
| 39 | #ifndef OV_EXCLUDE_STATIC_CALLBACKScxx . . $ `external/vorbis/vorbisfile.cpp:20:9`! |
| 40 | |
| 41 | /* a few sets of convenient callbacks, especially for use under |
| 42 | * Windows where ov_open_callbacks() should always be used instead of |
| 43 | * ov_open() to avoid problems with incompatible crt.o version linking |
| 44 | * issues. */ |
| 45 | |
| 46 | /* These structs below (OV_CALLBACKS_DEFAULT etc) are defined here as |
| 47 | * static data. That means that every file which includes this header |
| 48 | * will get its own copy of these structs whether it uses them or |
| 49 | * not unless it #defines OV_EXCLUDE_STATIC_CALLBACKS. |
| 50 | * These static symbols are essential on platforms such as Windows on |
| 51 | * which several different versions of stdio support may be linked to |
| 52 | * by different DLLs, and we need to be certain we know which one |
| 53 | * we're using (the same one as the main application). |
| 54 | */ |
| 55 | |
| 56 | static ov_callbacks OV_CALLBACKS_NOCLOSE = { |
| 57 | (size_t (*)(void *, size_t, size_t, void *)) fread, |
| 58 | (int (*)(void *, ogg_int64_t, int)) fseeko, |
| 59 | (int (*)(void *)) nullptr, |
| 60 | (long (*)(void *)) ftell |
| 61 | }; |
| 62 | |
| 63 | #endif |
| 64 | |
| 65 | #define NOTOPENcxx . . $ `external/vorbis/vorbisfile.h:65:10`! 0 |
| 66 | #define PARTOPENcxx . . $ `external/vorbis/vorbisfile.h:66:10`! 1 |
| 67 | #define OPENEDcxx . . $ `external/vorbis/vorbisfile.h:67:10`! 2 |
| 68 | #define STREAMSETcxx . . $ `external/vorbis/vorbisfile.h:68:10`! 3 |
| 69 | #define INITSETcxx . . $ `external/vorbis/vorbisfile.h:69:10`! 4 |
| 70 | |
| 71 | typedef struct OggVorbis_Filecxx . . $ OggVorbis_File# { |
| 72 | void *datasourcecxx . . $ OggVorbis_File#datasource.; /* Pointer to a FILE *, etc. */ |
| 73 | int seekablecxx . . $ OggVorbis_File#seekable.; |
| 74 | ogg_int64_tcxx . . $ ogg_int64_t# offsetcxx . . $ OggVorbis_File#offset.; |
| 75 | ogg_int64_tcxx . . $ ogg_int64_t# endcxx . . $ OggVorbis_File#end.; |
| 76 | ogg_sync_statecxx . . $ ogg_sync_state# oycxx . . $ OggVorbis_File#oy.; |
| 77 | |
| 78 | /* If the FILE handle isn't seekable (eg, a pipe), only the current |
| 79 | stream appears */ |
| 80 | int linkscxx . . $ OggVorbis_File#links.; |
| 81 | ogg_int64_tcxx . . $ ogg_int64_t# *offsetscxx . . $ OggVorbis_File#offsets.; |
| 82 | ogg_int64_tcxx . . $ ogg_int64_t# *dataoffsetscxx . . $ OggVorbis_File#dataoffsets.; |
| 83 | long *serialnoscxx . . $ OggVorbis_File#serialnos.; |
| 84 | ogg_int64_tcxx . . $ ogg_int64_t# *pcmlengthscxx . . $ OggVorbis_File#pcmlengths.; /* overloaded to maintain binary |
| 85 | compatibility; x2 size, stores both |
| 86 | beginning and end values */ |
| 87 | vorbis_infocxx . . $ vorbis_info# *vicxx . . $ OggVorbis_File#vi.; |
| 88 | vorbis_commentcxx . . $ vorbis_comment# *vccxx . . $ OggVorbis_File#vc.; |
| 89 | |
| 90 | /* Decoding working state local storage */ |
| 91 | ogg_int64_tcxx . . $ ogg_int64_t# pcm_offsetcxx . . $ OggVorbis_File#pcm_offset.; |
| 92 | int ready_statecxx . . $ OggVorbis_File#ready_state.; |
| 93 | long current_serialnocxx . . $ OggVorbis_File#current_serialno.; |
| 94 | int current_linkcxx . . $ OggVorbis_File#current_link.; |
| 95 | |
| 96 | double bittrackcxx . . $ OggVorbis_File#bittrack.; |
| 97 | double samptrackcxx . . $ OggVorbis_File#samptrack.; |
| 98 | |
| 99 | ogg_stream_statecxx . . $ ogg_stream_state# oscxx . . $ OggVorbis_File#os.; /* take physical pages, weld into a logical |
| 100 | stream of packets */ |
| 101 | vorbis_dsp_statecxx . . $ vorbis_dsp_state# vdcxx . . $ OggVorbis_File#vd.; /* central working state for the packet->PCM decoder */ |
| 102 | vorbis_blockcxx . . $ vorbis_block# vbcxx . . $ OggVorbis_File#vb.; /* local working space for packet->PCM decode */ |
| 103 | |
| 104 | ov_callbackscxx . . $ ov_callbacks# callbackscxx . . $ OggVorbis_File#callbacks.; |
| 105 | |
| 106 | } OggVorbis_Filecxx . . $ OggVorbis_File#; |
| 107 | |
| 108 | |
| 109 | extern int ov_clearcxx . . $ ov_clear(231cee6479b09f2b).(OggVorbis_Filecxx . . $ OggVorbis_File# *vf); |
| 110 | extern int ov_fopencxx . . $ ov_fopen(b3b59e4e0121f5e7).(const char *path,OggVorbis_Filecxx . . $ OggVorbis_File# *vf); |
| 111 | extern int ov_opencxx . . $ ov_open(14abe1420fd41867).(FILE *f,OggVorbis_Filecxx . . $ OggVorbis_File# *vf,const char *initial,long ibytes); |
| 112 | extern int ov_open_callbackscxx . . $ ov_open_callbacks(80dfd33e0e406a85).(void *datasource, OggVorbis_Filecxx . . $ OggVorbis_File# *vf, |
| 113 | const char *initial, long ibytes, ov_callbackscxx . . $ ov_callbacks# callbacks); |
| 114 | |
| 115 | extern int ov_testcxx . . $ ov_test(14abe1420fd41867).(FILE *f,OggVorbis_Filecxx . . $ OggVorbis_File# *vf,const char *initial,long ibytes); |
| 116 | extern int ov_test_callbackscxx . . $ ov_test_callbacks(80dfd33e0e406a85).(void *datasource, OggVorbis_Filecxx . . $ OggVorbis_File# *vf, |
| 117 | const char *initial, long ibytes, ov_callbackscxx . . $ ov_callbacks# callbacks); |
| 118 | extern int ov_test_opencxx . . $ ov_test_open(231cee6479b09f2b).(OggVorbis_Filecxx . . $ OggVorbis_File# *vf); |
| 119 | |
| 120 | extern long ov_bitratecxx . . $ ov_bitrate(848dcfd6565c9c04).(OggVorbis_Filecxx . . $ OggVorbis_File# *vf,int i); |
| 121 | extern long ov_bitrate_instantcxx . . $ ov_bitrate_instant(cc66401103655b07).(OggVorbis_Filecxx . . $ OggVorbis_File# *vf); |
| 122 | extern long ov_streamscxx . . $ ov_streams(cc66401103655b07).(OggVorbis_Filecxx . . $ OggVorbis_File# *vf); |
| 123 | extern long ov_seekablecxx . . $ ov_seekable(cc66401103655b07).(OggVorbis_Filecxx . . $ OggVorbis_File# *vf); |
| 124 | extern long ov_serialnumbercxx . . $ ov_serialnumber(848dcfd6565c9c04).(OggVorbis_Filecxx . . $ OggVorbis_File# *vf,int i); |
| 125 | |
| 126 | extern ogg_int64_tcxx . . $ ogg_int64_t# ov_raw_totalcxx . . $ ov_raw_total(848dcfd6565c9c04).(OggVorbis_Filecxx . . $ OggVorbis_File# *vf,int i); |
| 127 | extern ogg_int64_tcxx . . $ ogg_int64_t# ov_pcm_totalcxx . . $ ov_pcm_total(848dcfd6565c9c04).(OggVorbis_Filecxx . . $ OggVorbis_File# *vf,int i); |
| 128 | extern double ov_time_totalcxx . . $ ov_time_total(51460286bd79cdc2).(OggVorbis_Filecxx . . $ OggVorbis_File# *vf,int i); |
| 129 | |
| 130 | extern int ov_raw_seekcxx . . $ ov_raw_seek(2602c1e715810f3a).(OggVorbis_Filecxx . . $ OggVorbis_File# *vf,ogg_int64_tcxx . . $ ogg_int64_t# pos); |
| 131 | extern int ov_pcm_seekcxx . . $ ov_pcm_seek(2602c1e715810f3a).(OggVorbis_Filecxx . . $ OggVorbis_File# *vf,ogg_int64_tcxx . . $ ogg_int64_t# pos); |
| 132 | extern int ov_pcm_seek_pagecxx . . $ ov_pcm_seek_page(2602c1e715810f3a).(OggVorbis_Filecxx . . $ OggVorbis_File# *vf,ogg_int64_tcxx . . $ ogg_int64_t# pos); |
| 133 | extern int ov_time_seekcxx . . $ ov_time_seek(503e2689db2d7b).(OggVorbis_Filecxx . . $ OggVorbis_File# *vf,double pos); |
| 134 | extern int ov_time_seek_pagecxx . . $ ov_time_seek_page(503e2689db2d7b).(OggVorbis_Filecxx . . $ OggVorbis_File# *vf,double pos); |
| 135 | |
| 136 | extern int ov_raw_seek_lapcxx . . $ ov_raw_seek_lap(2602c1e715810f3a).(OggVorbis_Filecxx . . $ OggVorbis_File# *vf,ogg_int64_tcxx . . $ ogg_int64_t# pos); |
| 137 | extern int ov_pcm_seek_lapcxx . . $ ov_pcm_seek_lap(2602c1e715810f3a).(OggVorbis_Filecxx . . $ OggVorbis_File# *vf,ogg_int64_tcxx . . $ ogg_int64_t# pos); |
| 138 | extern int ov_pcm_seek_page_lapcxx . . $ ov_pcm_seek_page_lap(2602c1e715810f3a).(OggVorbis_Filecxx . . $ OggVorbis_File# *vf,ogg_int64_tcxx . . $ ogg_int64_t# pos); |
| 139 | extern int ov_time_seek_lapcxx . . $ ov_time_seek_lap(503e2689db2d7b).(OggVorbis_Filecxx . . $ OggVorbis_File# *vf,double pos); |
| 140 | extern int ov_time_seek_page_lapcxx . . $ ov_time_seek_page_lap(503e2689db2d7b).(OggVorbis_Filecxx . . $ OggVorbis_File# *vf,double pos); |
| 141 | |
| 142 | extern ogg_int64_tcxx . . $ ogg_int64_t# ov_raw_tellcxx . . $ ov_raw_tell(cc66401103655b07).(OggVorbis_Filecxx . . $ OggVorbis_File# *vf); |
| 143 | extern ogg_int64_tcxx . . $ ogg_int64_t# ov_pcm_tellcxx . . $ ov_pcm_tell(cc66401103655b07).(OggVorbis_Filecxx . . $ OggVorbis_File# *vf); |
| 144 | extern double ov_time_tellcxx . . $ ov_time_tell(48eb548637fa8094).(OggVorbis_Filecxx . . $ OggVorbis_File# *vf); |
| 145 | |
| 146 | extern vorbis_infocxx . . $ vorbis_info# *ov_infocxx . . $ ov_info(8f27ddcb17d7c056).(OggVorbis_Filecxx . . $ OggVorbis_File# *vf,int link); |
| 147 | extern vorbis_commentcxx . . $ vorbis_comment# *ov_commentcxx . . $ ov_comment(5c593f69dba24d40).(OggVorbis_Filecxx . . $ OggVorbis_File# *vf,int link); |
| 148 | |
| 149 | extern long ov_read_floatcxx . . $ ov_read_float(8d354fe94c5278c9).(OggVorbis_Filecxx . . $ OggVorbis_File# *vf,float ***pcm_channels,int samples, |
| 150 | int *bitstream); |
| 151 | extern long ov_read_filtercxx . . $ ov_read_filter(bc246da8bc138f62).(OggVorbis_Filecxx . . $ OggVorbis_File# *vf,char *buffer,int length, |
| 152 | int bigendianp,int word,int sgned,int *bitstream, |
| 153 | void (*filter)(float **pcm,long channels,long samples,void *filter_param),void *filter_param); |
| 154 | extern long ov_readcxx . . $ ov_read(4c1eed8e155d8bc6).(OggVorbis_Filecxx . . $ OggVorbis_File# *vf,char *buffer,int length, |
| 155 | int bigendianp,int word,int sgned,int *bitstream); |
| 156 | extern int ov_crosslapcxx . . $ ov_crosslap(cc69377286883955).(OggVorbis_Filecxx . . $ OggVorbis_File# *vf1,OggVorbis_Filecxx . . $ OggVorbis_File# *vf2); |
| 157 | |
| 158 | extern int ov_halfratecxx . . $ ov_halfrate(dc3d5f1026a70579).(OggVorbis_Filecxx . . $ OggVorbis_File# *vf,int flag); |
| 159 | extern int ov_halfrate_pcxx . . $ ov_halfrate_p(231cee6479b09f2b).(OggVorbis_Filecxx . . $ OggVorbis_File# *vf); |
| 160 | |
| 161 | |
| 162 | #endif |
| 163 |