| 1 | /******************************************************************** |
| 2 | * * |
| 3 | * THIS FILE IS PART OF THE OggVorbis 'TREMOR' CODEC SOURCE CODE. * |
| 4 | * * |
| 5 | * USE, DISTRIBUTION AND REPRODUCTION OF THIS LIBRARY SOURCE IS * |
| 6 | * GOVERNED BY A BSD-STYLE SOURCE LICENSE INCLUDED WITH THIS SOURCE * |
| 7 | * IN 'COPYING'. PLEASE READ THESE TERMS BEFORE DISTRIBUTING. * |
| 8 | * * |
| 9 | * THE OggVorbis 'TREMOR' SOURCE CODE IS (C) COPYRIGHT 1994-2002 * |
| 10 | * BY THE Xiph.Org FOUNDATION http://www.xiph.org/ * |
| 11 | * * |
| 12 | ******************************************************************** |
| 13 | |
| 14 | function: stdio-based convenience library for opening/seeking/decoding |
| 15 | |
| 16 | ********************************************************************/ |
| 17 | |
| 18 | #ifndef _OV_FILE_H_ |
| 19 | #define _OV_FILE_H_cxx . . $ `mednafen/tremor/ivorbisfile.h:19:9`! |
| 20 | |
| 21 | #ifdef __cpluspluscxx . . $ `<built-in>:471:9`! |
| 22 | extern "C" |
| 23 | { |
| 24 | #endif /* __cplusplus */ |
| 25 | |
| 26 | #include <stdio.h> |
| 27 | #include "ivorbiscodec.h"cxx . . $ `<file>/mednafen/tremor/ivorbiscodec.h`/ |
| 28 | |
| 29 | #define CHUNKSIZEcxx . . $ `mednafen/tremor/ivorbisfile.h:29:9`! 1024 |
| 30 | /* The function prototypes for the callbacks are basically the same as for |
| 31 | * the stdio functions fread, fseek, fclose, ftell. |
| 32 | * The one difference is that the FILE * arguments have been replaced with |
| 33 | * a void * - this is to be used as a pointer to whatever internal data these |
| 34 | * functions might need. In the stdio case, it's just a FILE * cast to a void * |
| 35 | * |
| 36 | * If you use other functions, check the docs for these functions and return |
| 37 | * the right values. For seek_func(), you *MUST* return -1 if the stream is |
| 38 | * unseekable |
| 39 | */ |
| 40 | typedef structcxx . . $ $anonymous_type_350a0c348c81a5af_0# { |
| 41 | size_t (*read_funccxx . . $ $anonymous_type_350a0c348c81a5af_0#read_func.) (void *ptr, size_t size, size_t nmemb, void *datasource); |
| 42 | int (*seek_funccxx . . $ $anonymous_type_350a0c348c81a5af_0#seek_func.) (void *datasource, ogg_int64_tcxx . . $ ogg_int64_t# offset, int whence); |
| 43 | int (*close_funccxx . . $ $anonymous_type_350a0c348c81a5af_0#close_func.) (void *datasource); |
| 44 | long (*tell_funccxx . . $ $anonymous_type_350a0c348c81a5af_0#tell_func.) (void *datasource); |
| 45 | } ov_callbackscxx . . $ ov_callbacks#; |
| 46 | |
| 47 | #define NOTOPENcxx . . $ `mednafen/tremor/ivorbisfile.h:47:10`! 0 |
| 48 | #define PARTOPENcxx . . $ `mednafen/tremor/ivorbisfile.h:48:10`! 1 |
| 49 | #define OPENEDcxx . . $ `mednafen/tremor/ivorbisfile.h:49:10`! 2 |
| 50 | #define STREAMSETcxx . . $ `mednafen/tremor/ivorbisfile.h:50:10`! 3 |
| 51 | #define INITSETcxx . . $ `mednafen/tremor/ivorbisfile.h:51:10`! 4 |
| 52 | |
| 53 | typedef struct OggVorbis_Filecxx . . $ OggVorbis_File# { |
| 54 | void *datasourcecxx . . $ OggVorbis_File#datasource.; /* Pointer to a FILE *, etc. */ |
| 55 | int seekablecxx . . $ OggVorbis_File#seekable.; |
| 56 | ogg_int64_tcxx . . $ ogg_int64_t# offsetcxx . . $ OggVorbis_File#offset.; |
| 57 | ogg_int64_tcxx . . $ ogg_int64_t# endcxx . . $ OggVorbis_File#end.; |
| 58 | ogg_sync_statecxx . . $ ogg_sync_state# oycxx . . $ OggVorbis_File#oy.; |
| 59 | |
| 60 | /* If the FILE handle isn't seekable (eg, a pipe), only the current |
| 61 | stream appears */ |
| 62 | int linkscxx . . $ OggVorbis_File#links.; |
| 63 | ogg_int64_tcxx . . $ ogg_int64_t# *offsetscxx . . $ OggVorbis_File#offsets.; |
| 64 | ogg_int64_tcxx . . $ ogg_int64_t# *dataoffsetscxx . . $ OggVorbis_File#dataoffsets.; |
| 65 | ogg_uint32_tcxx . . $ ogg_uint32_t# *serialnoscxx . . $ OggVorbis_File#serialnos.; |
| 66 | ogg_int64_tcxx . . $ ogg_int64_t# *pcmlengthscxx . . $ OggVorbis_File#pcmlengths.; |
| 67 | vorbis_infocxx . . $ vorbis_info# *vicxx . . $ OggVorbis_File#vi.; |
| 68 | vorbis_commentcxx . . $ vorbis_comment# *vccxx . . $ OggVorbis_File#vc.; |
| 69 | |
| 70 | /* Decoding working state local storage */ |
| 71 | ogg_int64_tcxx . . $ ogg_int64_t# pcm_offsetcxx . . $ OggVorbis_File#pcm_offset.; |
| 72 | int ready_statecxx . . $ OggVorbis_File#ready_state.; |
| 73 | ogg_uint32_tcxx . . $ ogg_uint32_t# current_serialnocxx . . $ OggVorbis_File#current_serialno.; |
| 74 | int current_linkcxx . . $ OggVorbis_File#current_link.; |
| 75 | |
| 76 | ogg_int64_tcxx . . $ ogg_int64_t# bittrackcxx . . $ OggVorbis_File#bittrack.; |
| 77 | ogg_int64_tcxx . . $ ogg_int64_t# samptrackcxx . . $ OggVorbis_File#samptrack.; |
| 78 | |
| 79 | ogg_stream_statecxx . . $ ogg_stream_state# oscxx . . $ OggVorbis_File#os.; /* take physical pages, weld into a logical |
| 80 | stream of packets */ |
| 81 | vorbis_dsp_statecxx . . $ vorbis_dsp_state# vdcxx . . $ OggVorbis_File#vd.; /* central working state for the packet->PCM decoder */ |
| 82 | vorbis_blockcxx . . $ vorbis_block# vbcxx . . $ OggVorbis_File#vb.; /* local working space for packet->PCM decode */ |
| 83 | |
| 84 | ov_callbackscxx . . $ ov_callbacks# callbackscxx . . $ OggVorbis_File#callbacks.; |
| 85 | |
| 86 | } OggVorbis_Filecxx . . $ OggVorbis_File#; |
| 87 | |
| 88 | extern int ov_clearcxx . . $ ov_clear(231cee6479b09f2b).(OggVorbis_Filecxx . . $ OggVorbis_File# *vf); |
| 89 | extern int ov_opencxx . . $ ov_open(14abe1420fd41867).(FILEcxx . . $ FILE# *f,OggVorbis_Filecxx . . $ OggVorbis_File# *vf,const char *initial,long ibytes); |
| 90 | extern int ov_open_callbackscxx . . $ ov_open_callbacks(80dfd33e0e406a85).(void *datasource, OggVorbis_Filecxx . . $ OggVorbis_File# *vf, |
| 91 | const char *initial, long ibytes, ov_callbackscxx . . $ ov_callbacks# callbacks); |
| 92 | |
| 93 | extern int ov_testcxx . . $ ov_test(14abe1420fd41867).(FILEcxx . . $ FILE# *f,OggVorbis_Filecxx . . $ OggVorbis_File# *vf,const char *initial,long ibytes); |
| 94 | extern int ov_test_callbackscxx . . $ ov_test_callbacks(80dfd33e0e406a85).(void *datasource, OggVorbis_Filecxx . . $ OggVorbis_File# *vf, |
| 95 | const char *initial, long ibytes, ov_callbackscxx . . $ ov_callbacks# callbacks); |
| 96 | extern int ov_test_opencxx . . $ ov_test_open(231cee6479b09f2b).(OggVorbis_Filecxx . . $ OggVorbis_File# *vf); |
| 97 | |
| 98 | extern long ov_bitratecxx . . $ ov_bitrate(848dcfd6565c9c04).(OggVorbis_Filecxx . . $ OggVorbis_File# *vf,int i); |
| 99 | extern long ov_bitrate_instantcxx . . $ ov_bitrate_instant(cc66401103655b07).(OggVorbis_Filecxx . . $ OggVorbis_File# *vf); |
| 100 | extern long ov_streamscxx . . $ ov_streams(cc66401103655b07).(OggVorbis_Filecxx . . $ OggVorbis_File# *vf); |
| 101 | extern long ov_seekablecxx . . $ ov_seekable(cc66401103655b07).(OggVorbis_Filecxx . . $ OggVorbis_File# *vf); |
| 102 | extern long ov_serialnumbercxx . . $ ov_serialnumber(848dcfd6565c9c04).(OggVorbis_Filecxx . . $ OggVorbis_File# *vf,int i); |
| 103 | |
| 104 | extern ogg_int64_tcxx . . $ ogg_int64_t# ov_raw_totalcxx . . $ ov_raw_total(848dcfd6565c9c04).(OggVorbis_Filecxx . . $ OggVorbis_File# *vf,int i); |
| 105 | extern ogg_int64_tcxx . . $ ogg_int64_t# ov_pcm_totalcxx . . $ ov_pcm_total(848dcfd6565c9c04).(OggVorbis_Filecxx . . $ OggVorbis_File# *vf,int i); |
| 106 | extern ogg_int64_tcxx . . $ ogg_int64_t# ov_time_totalcxx . . $ ov_time_total(848dcfd6565c9c04).(OggVorbis_Filecxx . . $ OggVorbis_File# *vf,int i); |
| 107 | |
| 108 | extern int ov_raw_seekcxx . . $ ov_raw_seek(2602c1e715810f3a).(OggVorbis_Filecxx . . $ OggVorbis_File# *vf,ogg_int64_tcxx . . $ ogg_int64_t# pos); |
| 109 | extern int ov_pcm_seekcxx . . $ ov_pcm_seek(2602c1e715810f3a).(OggVorbis_Filecxx . . $ OggVorbis_File# *vf,ogg_int64_tcxx . . $ ogg_int64_t# pos); |
| 110 | extern int ov_pcm_seek_pagecxx . . $ ov_pcm_seek_page(2602c1e715810f3a).(OggVorbis_Filecxx . . $ OggVorbis_File# *vf,ogg_int64_tcxx . . $ ogg_int64_t# pos); |
| 111 | extern int ov_time_seekcxx . . $ ov_time_seek(2602c1e715810f3a).(OggVorbis_Filecxx . . $ OggVorbis_File# *vf,ogg_int64_tcxx . . $ ogg_int64_t# pos); |
| 112 | extern int ov_time_seek_pagecxx . . $ ov_time_seek_page(2602c1e715810f3a).(OggVorbis_Filecxx . . $ OggVorbis_File# *vf,ogg_int64_tcxx . . $ ogg_int64_t# pos); |
| 113 | |
| 114 | extern ogg_int64_tcxx . . $ ogg_int64_t# ov_raw_tellcxx . . $ ov_raw_tell(cc66401103655b07).(OggVorbis_Filecxx . . $ OggVorbis_File# *vf); |
| 115 | extern ogg_int64_tcxx . . $ ogg_int64_t# ov_pcm_tellcxx . . $ ov_pcm_tell(cc66401103655b07).(OggVorbis_Filecxx . . $ OggVorbis_File# *vf); |
| 116 | extern ogg_int64_tcxx . . $ ogg_int64_t# ov_time_tellcxx . . $ ov_time_tell(cc66401103655b07).(OggVorbis_Filecxx . . $ OggVorbis_File# *vf); |
| 117 | |
| 118 | extern vorbis_infocxx . . $ vorbis_info# *ov_infocxx . . $ ov_info(8f27ddcb17d7c056).(OggVorbis_Filecxx . . $ OggVorbis_File# *vf,int link); |
| 119 | extern vorbis_commentcxx . . $ vorbis_comment# *ov_commentcxx . . $ ov_comment(5c593f69dba24d40).(OggVorbis_Filecxx . . $ OggVorbis_File# *vf,int link); |
| 120 | |
| 121 | extern long ov_readcxx . . $ ov_read(fecdd0574488f6f9).(OggVorbis_Filecxx . . $ OggVorbis_File# *vf,char *buffer,int length, |
| 122 | int *bitstream); |
| 123 | |
| 124 | #ifdef __cpluspluscxx . . $ `<built-in>:471:9`! |
| 125 | } |
| 126 | #endif /* __cplusplus */ |
| 127 | |
| 128 | #endif |
| 129 | |
| 130 |