openalbridge/oggvorbis.h
author koda
Sun, 12 Jul 2009 13:51:29 +0000
changeset 2257 7eb31efcfb9b
parent 2213 bd51bbf06033
child 2260 31756e21c436
permissions -rw-r--r--
updates licence and fix a memory leak (which was consuming iphone memory)
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
2213
bd51bbf06033 -Smaxx's porting of the library to MSVC compilers
koda
parents:
diff changeset
     1
/********************************************************************
bd51bbf06033 -Smaxx's porting of the library to MSVC compilers
koda
parents:
diff changeset
     2
 *                                                                  *
bd51bbf06033 -Smaxx's porting of the library to MSVC compilers
koda
parents:
diff changeset
     3
 * THIS FILE IS PART OF THE OggVorbis SOFTWARE CODEC SOURCE CODE.   *
bd51bbf06033 -Smaxx's porting of the library to MSVC compilers
koda
parents:
diff changeset
     4
 * USE, DISTRIBUTION AND REPRODUCTION OF THIS LIBRARY SOURCE IS     *
bd51bbf06033 -Smaxx's porting of the library to MSVC compilers
koda
parents:
diff changeset
     5
 * GOVERNED BY A BSD-STYLE SOURCE LICENSE INCLUDED WITH THIS SOURCE *
bd51bbf06033 -Smaxx's porting of the library to MSVC compilers
koda
parents:
diff changeset
     6
 * IN 'COPYING'. PLEASE READ THESE TERMS BEFORE DISTRIBUTING.       *
bd51bbf06033 -Smaxx's porting of the library to MSVC compilers
koda
parents:
diff changeset
     7
 *                                                                  *
bd51bbf06033 -Smaxx's porting of the library to MSVC compilers
koda
parents:
diff changeset
     8
 * THE OggVorbis SOURCE CODE IS (C) COPYRIGHT 1994-2002             *
bd51bbf06033 -Smaxx's porting of the library to MSVC compilers
koda
parents:
diff changeset
     9
 * by the Xiph.Org Foundation http://www.xiph.org/                  *
bd51bbf06033 -Smaxx's porting of the library to MSVC compilers
koda
parents:
diff changeset
    10
 *                                                                  *
bd51bbf06033 -Smaxx's porting of the library to MSVC compilers
koda
parents:
diff changeset
    11
 ********************************************************************/
bd51bbf06033 -Smaxx's porting of the library to MSVC compilers
koda
parents:
diff changeset
    12
bd51bbf06033 -Smaxx's porting of the library to MSVC compilers
koda
parents:
diff changeset
    13
#ifndef _OGGVORBIS_H
bd51bbf06033 -Smaxx's porting of the library to MSVC compilers
koda
parents:
diff changeset
    14
#define _OGGVORBIS_H
bd51bbf06033 -Smaxx's porting of the library to MSVC compilers
koda
parents:
diff changeset
    15
bd51bbf06033 -Smaxx's porting of the library to MSVC compilers
koda
parents:
diff changeset
    16
/*data types for ogg and vorbis that are required to be external*/
bd51bbf06033 -Smaxx's porting of the library to MSVC compilers
koda
parents:
diff changeset
    17
#ifndef ogg_int64_t	
bd51bbf06033 -Smaxx's porting of the library to MSVC compilers
koda
parents:
diff changeset
    18
#define ogg_int64_t int64_t
bd51bbf06033 -Smaxx's porting of the library to MSVC compilers
koda
parents:
diff changeset
    19
#endif
bd51bbf06033 -Smaxx's porting of the library to MSVC compilers
koda
parents:
diff changeset
    20
bd51bbf06033 -Smaxx's porting of the library to MSVC compilers
koda
parents:
diff changeset
    21
typedef struct {
bd51bbf06033 -Smaxx's porting of the library to MSVC compilers
koda
parents:
diff changeset
    22
	unsigned char *data;
bd51bbf06033 -Smaxx's porting of the library to MSVC compilers
koda
parents:
diff changeset
    23
	int storage;
bd51bbf06033 -Smaxx's porting of the library to MSVC compilers
koda
parents:
diff changeset
    24
	int fill;
bd51bbf06033 -Smaxx's porting of the library to MSVC compilers
koda
parents:
diff changeset
    25
	int returned;
bd51bbf06033 -Smaxx's porting of the library to MSVC compilers
koda
parents:
diff changeset
    26
	
bd51bbf06033 -Smaxx's porting of the library to MSVC compilers
koda
parents:
diff changeset
    27
	int unsynced;
bd51bbf06033 -Smaxx's porting of the library to MSVC compilers
koda
parents:
diff changeset
    28
	int headerbytes;
bd51bbf06033 -Smaxx's porting of the library to MSVC compilers
koda
parents:
diff changeset
    29
	int bodybytes;
bd51bbf06033 -Smaxx's porting of the library to MSVC compilers
koda
parents:
diff changeset
    30
} ogg_sync_state;
bd51bbf06033 -Smaxx's porting of the library to MSVC compilers
koda
parents:
diff changeset
    31
typedef struct vorbis_info{
bd51bbf06033 -Smaxx's porting of the library to MSVC compilers
koda
parents:
diff changeset
    32
	int version;
bd51bbf06033 -Smaxx's porting of the library to MSVC compilers
koda
parents:
diff changeset
    33
	int channels;
bd51bbf06033 -Smaxx's porting of the library to MSVC compilers
koda
parents:
diff changeset
    34
	long rate;
bd51bbf06033 -Smaxx's porting of the library to MSVC compilers
koda
parents:
diff changeset
    35
	
bd51bbf06033 -Smaxx's porting of the library to MSVC compilers
koda
parents:
diff changeset
    36
	/* The below bitrate declarations are *hints*.
bd51bbf06033 -Smaxx's porting of the library to MSVC compilers
koda
parents:
diff changeset
    37
	 Combinations of the three values carry the following implications:
bd51bbf06033 -Smaxx's porting of the library to MSVC compilers
koda
parents:
diff changeset
    38
	 
bd51bbf06033 -Smaxx's porting of the library to MSVC compilers
koda
parents:
diff changeset
    39
	 all three set to the same value:
bd51bbf06033 -Smaxx's porting of the library to MSVC compilers
koda
parents:
diff changeset
    40
	 implies a fixed rate bitstream
bd51bbf06033 -Smaxx's porting of the library to MSVC compilers
koda
parents:
diff changeset
    41
	 only nominal set:
bd51bbf06033 -Smaxx's porting of the library to MSVC compilers
koda
parents:
diff changeset
    42
	 implies a VBR stream that averages the nominal bitrate.  No hard
bd51bbf06033 -Smaxx's porting of the library to MSVC compilers
koda
parents:
diff changeset
    43
	 upper/lower limit
bd51bbf06033 -Smaxx's porting of the library to MSVC compilers
koda
parents:
diff changeset
    44
	 upper and or lower set:
bd51bbf06033 -Smaxx's porting of the library to MSVC compilers
koda
parents:
diff changeset
    45
	 implies a VBR bitstream that obeys the bitrate limits. nominal
bd51bbf06033 -Smaxx's porting of the library to MSVC compilers
koda
parents:
diff changeset
    46
	 may also be set to give a nominal rate.
bd51bbf06033 -Smaxx's porting of the library to MSVC compilers
koda
parents:
diff changeset
    47
	 none set:
bd51bbf06033 -Smaxx's porting of the library to MSVC compilers
koda
parents:
diff changeset
    48
	 the coder does not care to speculate.
bd51bbf06033 -Smaxx's porting of the library to MSVC compilers
koda
parents:
diff changeset
    49
	 */
bd51bbf06033 -Smaxx's porting of the library to MSVC compilers
koda
parents:
diff changeset
    50
	
bd51bbf06033 -Smaxx's porting of the library to MSVC compilers
koda
parents:
diff changeset
    51
	long bitrate_upper;
bd51bbf06033 -Smaxx's porting of the library to MSVC compilers
koda
parents:
diff changeset
    52
	long bitrate_nominal;
bd51bbf06033 -Smaxx's porting of the library to MSVC compilers
koda
parents:
diff changeset
    53
	long bitrate_lower;
bd51bbf06033 -Smaxx's porting of the library to MSVC compilers
koda
parents:
diff changeset
    54
	long bitrate_window;
bd51bbf06033 -Smaxx's porting of the library to MSVC compilers
koda
parents:
diff changeset
    55
	
bd51bbf06033 -Smaxx's porting of the library to MSVC compilers
koda
parents:
diff changeset
    56
	void *codec_setup;
bd51bbf06033 -Smaxx's porting of the library to MSVC compilers
koda
parents:
diff changeset
    57
} vorbis_info;
bd51bbf06033 -Smaxx's porting of the library to MSVC compilers
koda
parents:
diff changeset
    58
typedef struct vorbis_comment{
bd51bbf06033 -Smaxx's porting of the library to MSVC compilers
koda
parents:
diff changeset
    59
	/* unlimited user comment fields.  libvorbis writes 'libvorbis' whatever vendor is set to in encode */
bd51bbf06033 -Smaxx's porting of the library to MSVC compilers
koda
parents:
diff changeset
    60
	char **user_comments;
bd51bbf06033 -Smaxx's porting of the library to MSVC compilers
koda
parents:
diff changeset
    61
	int   *comment_lengths;
bd51bbf06033 -Smaxx's porting of the library to MSVC compilers
koda
parents:
diff changeset
    62
	int    comments;
bd51bbf06033 -Smaxx's porting of the library to MSVC compilers
koda
parents:
diff changeset
    63
	char  *vendor;
bd51bbf06033 -Smaxx's porting of the library to MSVC compilers
koda
parents:
diff changeset
    64
	
bd51bbf06033 -Smaxx's porting of the library to MSVC compilers
koda
parents:
diff changeset
    65
} vorbis_comment;
bd51bbf06033 -Smaxx's porting of the library to MSVC compilers
koda
parents:
diff changeset
    66
typedef struct {
bd51bbf06033 -Smaxx's porting of the library to MSVC compilers
koda
parents:
diff changeset
    67
	unsigned char   *body_data;    /* bytes from packet bodies */
bd51bbf06033 -Smaxx's porting of the library to MSVC compilers
koda
parents:
diff changeset
    68
	long    body_storage;          /* storage elements allocated */
bd51bbf06033 -Smaxx's porting of the library to MSVC compilers
koda
parents:
diff changeset
    69
	long    body_fill;             /* elements stored; fill mark */
bd51bbf06033 -Smaxx's porting of the library to MSVC compilers
koda
parents:
diff changeset
    70
	long    body_returned;         /* elements of fill returned */
bd51bbf06033 -Smaxx's porting of the library to MSVC compilers
koda
parents:
diff changeset
    71
	
bd51bbf06033 -Smaxx's porting of the library to MSVC compilers
koda
parents:
diff changeset
    72
	
bd51bbf06033 -Smaxx's porting of the library to MSVC compilers
koda
parents:
diff changeset
    73
	int     *lacing_vals;      /* The values that will go to the segment table */
bd51bbf06033 -Smaxx's porting of the library to MSVC compilers
koda
parents:
diff changeset
    74
	ogg_int64_t *granule_vals; 
bd51bbf06033 -Smaxx's porting of the library to MSVC compilers
koda
parents:
diff changeset
    75
	/* granulepos values for headers. Not compact
bd51bbf06033 -Smaxx's porting of the library to MSVC compilers
koda
parents:
diff changeset
    76
	 this way, but it is simple coupled to the lacing fifo */
bd51bbf06033 -Smaxx's porting of the library to MSVC compilers
koda
parents:
diff changeset
    77
	long    lacing_storage;
bd51bbf06033 -Smaxx's porting of the library to MSVC compilers
koda
parents:
diff changeset
    78
	long    lacing_fill;
bd51bbf06033 -Smaxx's porting of the library to MSVC compilers
koda
parents:
diff changeset
    79
	long    lacing_packet;
bd51bbf06033 -Smaxx's porting of the library to MSVC compilers
koda
parents:
diff changeset
    80
	long    lacing_returned;
bd51bbf06033 -Smaxx's porting of the library to MSVC compilers
koda
parents:
diff changeset
    81
	
bd51bbf06033 -Smaxx's porting of the library to MSVC compilers
koda
parents:
diff changeset
    82
	unsigned char    header[282];      /* working space for header encode */
bd51bbf06033 -Smaxx's porting of the library to MSVC compilers
koda
parents:
diff changeset
    83
	int              header_fill;
bd51bbf06033 -Smaxx's porting of the library to MSVC compilers
koda
parents:
diff changeset
    84
	
bd51bbf06033 -Smaxx's porting of the library to MSVC compilers
koda
parents:
diff changeset
    85
	int     e_o_s;          /* set when we have buffered the last packet in the logical bitstream */
bd51bbf06033 -Smaxx's porting of the library to MSVC compilers
koda
parents:
diff changeset
    86
	int     b_o_s;          /* set after we've written the initial page of a logical bitstream */
bd51bbf06033 -Smaxx's porting of the library to MSVC compilers
koda
parents:
diff changeset
    87
	long    serialno;
bd51bbf06033 -Smaxx's porting of the library to MSVC compilers
koda
parents:
diff changeset
    88
	long    pageno;
bd51bbf06033 -Smaxx's porting of the library to MSVC compilers
koda
parents:
diff changeset
    89
	ogg_int64_t  packetno;      
bd51bbf06033 -Smaxx's porting of the library to MSVC compilers
koda
parents:
diff changeset
    90
	/* sequence number for decode; the framing
bd51bbf06033 -Smaxx's porting of the library to MSVC compilers
koda
parents:
diff changeset
    91
	 knows where there's a hole in the data,
bd51bbf06033 -Smaxx's porting of the library to MSVC compilers
koda
parents:
diff changeset
    92
	 but we need coupling so that the codec
bd51bbf06033 -Smaxx's porting of the library to MSVC compilers
koda
parents:
diff changeset
    93
	 (which is in a seperate abstraction
bd51bbf06033 -Smaxx's porting of the library to MSVC compilers
koda
parents:
diff changeset
    94
	 layer) also knows about the gap */
bd51bbf06033 -Smaxx's porting of the library to MSVC compilers
koda
parents:
diff changeset
    95
	ogg_int64_t   granulepos;
bd51bbf06033 -Smaxx's porting of the library to MSVC compilers
koda
parents:
diff changeset
    96
	
bd51bbf06033 -Smaxx's porting of the library to MSVC compilers
koda
parents:
diff changeset
    97
} ogg_stream_state;
bd51bbf06033 -Smaxx's porting of the library to MSVC compilers
koda
parents:
diff changeset
    98
typedef struct vorbis_dsp_state{
bd51bbf06033 -Smaxx's porting of the library to MSVC compilers
koda
parents:
diff changeset
    99
	int analysisp;
bd51bbf06033 -Smaxx's porting of the library to MSVC compilers
koda
parents:
diff changeset
   100
	vorbis_info *vi;
bd51bbf06033 -Smaxx's porting of the library to MSVC compilers
koda
parents:
diff changeset
   101
	
bd51bbf06033 -Smaxx's porting of the library to MSVC compilers
koda
parents:
diff changeset
   102
	float **pcm;
bd51bbf06033 -Smaxx's porting of the library to MSVC compilers
koda
parents:
diff changeset
   103
	float **pcmret;
bd51bbf06033 -Smaxx's porting of the library to MSVC compilers
koda
parents:
diff changeset
   104
	int      pcm_storage;
bd51bbf06033 -Smaxx's porting of the library to MSVC compilers
koda
parents:
diff changeset
   105
	int      pcm_current;
bd51bbf06033 -Smaxx's porting of the library to MSVC compilers
koda
parents:
diff changeset
   106
	int      pcm_returned;
bd51bbf06033 -Smaxx's porting of the library to MSVC compilers
koda
parents:
diff changeset
   107
	
bd51bbf06033 -Smaxx's porting of the library to MSVC compilers
koda
parents:
diff changeset
   108
	int  preextrapolate;
bd51bbf06033 -Smaxx's porting of the library to MSVC compilers
koda
parents:
diff changeset
   109
	int  eofflag;
bd51bbf06033 -Smaxx's porting of the library to MSVC compilers
koda
parents:
diff changeset
   110
	
bd51bbf06033 -Smaxx's porting of the library to MSVC compilers
koda
parents:
diff changeset
   111
	long lW;
bd51bbf06033 -Smaxx's porting of the library to MSVC compilers
koda
parents:
diff changeset
   112
	long W;
bd51bbf06033 -Smaxx's porting of the library to MSVC compilers
koda
parents:
diff changeset
   113
	long nW;
bd51bbf06033 -Smaxx's porting of the library to MSVC compilers
koda
parents:
diff changeset
   114
	long centerW;
bd51bbf06033 -Smaxx's porting of the library to MSVC compilers
koda
parents:
diff changeset
   115
	
bd51bbf06033 -Smaxx's porting of the library to MSVC compilers
koda
parents:
diff changeset
   116
	ogg_int64_t granulepos;
bd51bbf06033 -Smaxx's porting of the library to MSVC compilers
koda
parents:
diff changeset
   117
	ogg_int64_t sequence;
bd51bbf06033 -Smaxx's porting of the library to MSVC compilers
koda
parents:
diff changeset
   118
	
bd51bbf06033 -Smaxx's porting of the library to MSVC compilers
koda
parents:
diff changeset
   119
	ogg_int64_t glue_bits;
bd51bbf06033 -Smaxx's porting of the library to MSVC compilers
koda
parents:
diff changeset
   120
	ogg_int64_t time_bits;
bd51bbf06033 -Smaxx's porting of the library to MSVC compilers
koda
parents:
diff changeset
   121
	ogg_int64_t floor_bits;
bd51bbf06033 -Smaxx's porting of the library to MSVC compilers
koda
parents:
diff changeset
   122
	ogg_int64_t res_bits;
bd51bbf06033 -Smaxx's porting of the library to MSVC compilers
koda
parents:
diff changeset
   123
	
bd51bbf06033 -Smaxx's porting of the library to MSVC compilers
koda
parents:
diff changeset
   124
	void       *backend_state;
bd51bbf06033 -Smaxx's porting of the library to MSVC compilers
koda
parents:
diff changeset
   125
} vorbis_dsp_state;
bd51bbf06033 -Smaxx's porting of the library to MSVC compilers
koda
parents:
diff changeset
   126
typedef struct {
bd51bbf06033 -Smaxx's porting of the library to MSVC compilers
koda
parents:
diff changeset
   127
	long endbyte;
bd51bbf06033 -Smaxx's porting of the library to MSVC compilers
koda
parents:
diff changeset
   128
	int  endbit;
bd51bbf06033 -Smaxx's porting of the library to MSVC compilers
koda
parents:
diff changeset
   129
	
bd51bbf06033 -Smaxx's porting of the library to MSVC compilers
koda
parents:
diff changeset
   130
	unsigned char *buffer;
bd51bbf06033 -Smaxx's porting of the library to MSVC compilers
koda
parents:
diff changeset
   131
	unsigned char *ptr;
bd51bbf06033 -Smaxx's porting of the library to MSVC compilers
koda
parents:
diff changeset
   132
	long storage;
bd51bbf06033 -Smaxx's porting of the library to MSVC compilers
koda
parents:
diff changeset
   133
} oggpack_buffer;
bd51bbf06033 -Smaxx's porting of the library to MSVC compilers
koda
parents:
diff changeset
   134
typedef struct vorbis_block{
bd51bbf06033 -Smaxx's porting of the library to MSVC compilers
koda
parents:
diff changeset
   135
	/* necessary stream state for linking to the framing abstraction */
bd51bbf06033 -Smaxx's porting of the library to MSVC compilers
koda
parents:
diff changeset
   136
	float  **pcm;       /* this is a pointer into local storage */
bd51bbf06033 -Smaxx's porting of the library to MSVC compilers
koda
parents:
diff changeset
   137
	oggpack_buffer opb;
bd51bbf06033 -Smaxx's porting of the library to MSVC compilers
koda
parents:
diff changeset
   138
	
bd51bbf06033 -Smaxx's porting of the library to MSVC compilers
koda
parents:
diff changeset
   139
	long  lW;
bd51bbf06033 -Smaxx's porting of the library to MSVC compilers
koda
parents:
diff changeset
   140
	long  W;
bd51bbf06033 -Smaxx's porting of the library to MSVC compilers
koda
parents:
diff changeset
   141
	long  nW;
bd51bbf06033 -Smaxx's porting of the library to MSVC compilers
koda
parents:
diff changeset
   142
	int   pcmend;
bd51bbf06033 -Smaxx's porting of the library to MSVC compilers
koda
parents:
diff changeset
   143
	int   mode;
bd51bbf06033 -Smaxx's porting of the library to MSVC compilers
koda
parents:
diff changeset
   144
	
bd51bbf06033 -Smaxx's porting of the library to MSVC compilers
koda
parents:
diff changeset
   145
	int         eofflag;
bd51bbf06033 -Smaxx's porting of the library to MSVC compilers
koda
parents:
diff changeset
   146
	ogg_int64_t granulepos;
bd51bbf06033 -Smaxx's porting of the library to MSVC compilers
koda
parents:
diff changeset
   147
	ogg_int64_t sequence;
bd51bbf06033 -Smaxx's porting of the library to MSVC compilers
koda
parents:
diff changeset
   148
	vorbis_dsp_state *vd; /* For read-only access of configuration */
bd51bbf06033 -Smaxx's porting of the library to MSVC compilers
koda
parents:
diff changeset
   149
	
bd51bbf06033 -Smaxx's porting of the library to MSVC compilers
koda
parents:
diff changeset
   150
	/* local storage to avoid remallocing; it's up to the mapping to structure it */
bd51bbf06033 -Smaxx's porting of the library to MSVC compilers
koda
parents:
diff changeset
   151
	void               *localstore;
bd51bbf06033 -Smaxx's porting of the library to MSVC compilers
koda
parents:
diff changeset
   152
	long                localtop;
bd51bbf06033 -Smaxx's porting of the library to MSVC compilers
koda
parents:
diff changeset
   153
	long                localalloc;
bd51bbf06033 -Smaxx's porting of the library to MSVC compilers
koda
parents:
diff changeset
   154
	long                totaluse;
bd51bbf06033 -Smaxx's porting of the library to MSVC compilers
koda
parents:
diff changeset
   155
	struct alloc_chain *reap;
bd51bbf06033 -Smaxx's porting of the library to MSVC compilers
koda
parents:
diff changeset
   156
	
bd51bbf06033 -Smaxx's porting of the library to MSVC compilers
koda
parents:
diff changeset
   157
	/* bitmetrics for the frame */
bd51bbf06033 -Smaxx's porting of the library to MSVC compilers
koda
parents:
diff changeset
   158
	long glue_bits;
bd51bbf06033 -Smaxx's porting of the library to MSVC compilers
koda
parents:
diff changeset
   159
	long time_bits;
bd51bbf06033 -Smaxx's porting of the library to MSVC compilers
koda
parents:
diff changeset
   160
	long floor_bits;
bd51bbf06033 -Smaxx's porting of the library to MSVC compilers
koda
parents:
diff changeset
   161
	long res_bits;
bd51bbf06033 -Smaxx's porting of the library to MSVC compilers
koda
parents:
diff changeset
   162
	
bd51bbf06033 -Smaxx's porting of the library to MSVC compilers
koda
parents:
diff changeset
   163
	void *internal;
bd51bbf06033 -Smaxx's porting of the library to MSVC compilers
koda
parents:
diff changeset
   164
	
bd51bbf06033 -Smaxx's porting of the library to MSVC compilers
koda
parents:
diff changeset
   165
} vorbis_block;
bd51bbf06033 -Smaxx's porting of the library to MSVC compilers
koda
parents:
diff changeset
   166
typedef struct {
bd51bbf06033 -Smaxx's porting of the library to MSVC compilers
koda
parents:
diff changeset
   167
	size_t (*read_func)  (void *ptr, size_t size, size_t nmemb, void *datasource);
bd51bbf06033 -Smaxx's porting of the library to MSVC compilers
koda
parents:
diff changeset
   168
	int    (*seek_func)  (void *datasource, ogg_int64_t offset, int whence);
bd51bbf06033 -Smaxx's porting of the library to MSVC compilers
koda
parents:
diff changeset
   169
	int    (*close_func) (void *datasource);
bd51bbf06033 -Smaxx's porting of the library to MSVC compilers
koda
parents:
diff changeset
   170
	long   (*tell_func)  (void *datasource);
bd51bbf06033 -Smaxx's porting of the library to MSVC compilers
koda
parents:
diff changeset
   171
} ov_callbacks;
bd51bbf06033 -Smaxx's porting of the library to MSVC compilers
koda
parents:
diff changeset
   172
typedef struct OggVorbis_File {
bd51bbf06033 -Smaxx's porting of the library to MSVC compilers
koda
parents:
diff changeset
   173
	void            *datasource; /* Pointer to a FILE *, etc. */
bd51bbf06033 -Smaxx's porting of the library to MSVC compilers
koda
parents:
diff changeset
   174
	int              seekable;
bd51bbf06033 -Smaxx's porting of the library to MSVC compilers
koda
parents:
diff changeset
   175
	ogg_int64_t      offset;
bd51bbf06033 -Smaxx's porting of the library to MSVC compilers
koda
parents:
diff changeset
   176
	ogg_int64_t      end;
bd51bbf06033 -Smaxx's porting of the library to MSVC compilers
koda
parents:
diff changeset
   177
	ogg_sync_state   oy;
bd51bbf06033 -Smaxx's porting of the library to MSVC compilers
koda
parents:
diff changeset
   178
	
bd51bbf06033 -Smaxx's porting of the library to MSVC compilers
koda
parents:
diff changeset
   179
	/* If the FILE handle isn't seekable (eg, a pipe), only the current stream appears */
bd51bbf06033 -Smaxx's porting of the library to MSVC compilers
koda
parents:
diff changeset
   180
	int              links;
bd51bbf06033 -Smaxx's porting of the library to MSVC compilers
koda
parents:
diff changeset
   181
	ogg_int64_t     *offsets;
bd51bbf06033 -Smaxx's porting of the library to MSVC compilers
koda
parents:
diff changeset
   182
	ogg_int64_t     *dataoffsets;
bd51bbf06033 -Smaxx's porting of the library to MSVC compilers
koda
parents:
diff changeset
   183
	long            *serialnos;
bd51bbf06033 -Smaxx's porting of the library to MSVC compilers
koda
parents:
diff changeset
   184
	ogg_int64_t     *pcmlengths; 
bd51bbf06033 -Smaxx's porting of the library to MSVC compilers
koda
parents:
diff changeset
   185
	/* overloaded to maintain binary
bd51bbf06033 -Smaxx's porting of the library to MSVC compilers
koda
parents:
diff changeset
   186
	 compatability; x2 size, stores both
bd51bbf06033 -Smaxx's porting of the library to MSVC compilers
koda
parents:
diff changeset
   187
	 beginning and end values */
bd51bbf06033 -Smaxx's porting of the library to MSVC compilers
koda
parents:
diff changeset
   188
	vorbis_info     *vi;
bd51bbf06033 -Smaxx's porting of the library to MSVC compilers
koda
parents:
diff changeset
   189
	vorbis_comment  *vc;
bd51bbf06033 -Smaxx's porting of the library to MSVC compilers
koda
parents:
diff changeset
   190
	
bd51bbf06033 -Smaxx's porting of the library to MSVC compilers
koda
parents:
diff changeset
   191
	/* Decoding working state local storage */
bd51bbf06033 -Smaxx's porting of the library to MSVC compilers
koda
parents:
diff changeset
   192
	ogg_int64_t      pcm_offset;
bd51bbf06033 -Smaxx's porting of the library to MSVC compilers
koda
parents:
diff changeset
   193
	int              ready_state;
bd51bbf06033 -Smaxx's porting of the library to MSVC compilers
koda
parents:
diff changeset
   194
	long             current_serialno;
bd51bbf06033 -Smaxx's porting of the library to MSVC compilers
koda
parents:
diff changeset
   195
	int              current_link;
bd51bbf06033 -Smaxx's porting of the library to MSVC compilers
koda
parents:
diff changeset
   196
	
bd51bbf06033 -Smaxx's porting of the library to MSVC compilers
koda
parents:
diff changeset
   197
	double           bittrack;
bd51bbf06033 -Smaxx's porting of the library to MSVC compilers
koda
parents:
diff changeset
   198
	double           samptrack;
bd51bbf06033 -Smaxx's porting of the library to MSVC compilers
koda
parents:
diff changeset
   199
	
bd51bbf06033 -Smaxx's porting of the library to MSVC compilers
koda
parents:
diff changeset
   200
	ogg_stream_state os; /* take physical pages, weld into a logical stream of packets */
bd51bbf06033 -Smaxx's porting of the library to MSVC compilers
koda
parents:
diff changeset
   201
	vorbis_dsp_state vd; /* central working state for the packet->PCM decoder */
bd51bbf06033 -Smaxx's porting of the library to MSVC compilers
koda
parents:
diff changeset
   202
	vorbis_block     vb; /* local working space for packet->PCM decode */
bd51bbf06033 -Smaxx's porting of the library to MSVC compilers
koda
parents:
diff changeset
   203
	
bd51bbf06033 -Smaxx's porting of the library to MSVC compilers
koda
parents:
diff changeset
   204
	ov_callbacks callbacks;
bd51bbf06033 -Smaxx's porting of the library to MSVC compilers
koda
parents:
diff changeset
   205
	
bd51bbf06033 -Smaxx's porting of the library to MSVC compilers
koda
parents:
diff changeset
   206
} OggVorbis_File;
bd51bbf06033 -Smaxx's porting of the library to MSVC compilers
koda
parents:
diff changeset
   207
bd51bbf06033 -Smaxx's porting of the library to MSVC compilers
koda
parents:
diff changeset
   208
bd51bbf06033 -Smaxx's porting of the library to MSVC compilers
koda
parents:
diff changeset
   209
extern int ov_open(FILE *f,OggVorbis_File *vf,char *initial,long ibytes);
bd51bbf06033 -Smaxx's porting of the library to MSVC compilers
koda
parents:
diff changeset
   210
extern long ov_read(OggVorbis_File *vf,char *buffer,int length,int bigendianp,int word,int sgned,int *bitstream);
bd51bbf06033 -Smaxx's porting of the library to MSVC compilers
koda
parents:
diff changeset
   211
extern ogg_int64_t ov_pcm_total(OggVorbis_File *vf,int i);
bd51bbf06033 -Smaxx's porting of the library to MSVC compilers
koda
parents:
diff changeset
   212
extern long ov_read(OggVorbis_File *vf,char *buffer,int length,int bigendianp,int word,int sgned,int *bitstream);
bd51bbf06033 -Smaxx's porting of the library to MSVC compilers
koda
parents:
diff changeset
   213
extern vorbis_info *ov_info(OggVorbis_File *vf,int link);
bd51bbf06033 -Smaxx's porting of the library to MSVC compilers
koda
parents:
diff changeset
   214
extern vorbis_comment *ov_comment(OggVorbis_File *f, int num);
2257
7eb31efcfb9b updates licence and fix a memory leak (which was consuming iphone memory)
koda
parents: 2213
diff changeset
   215
extern int ov_clear(OggVorbis_File *vf);
2213
bd51bbf06033 -Smaxx's porting of the library to MSVC compilers
koda
parents:
diff changeset
   216
bd51bbf06033 -Smaxx's porting of the library to MSVC compilers
koda
parents:
diff changeset
   217
#endif /*_OGGVORBIS_H*/