openalbridge/oggvorbis.h
author unc0rr
Thu, 10 Sep 2009 07:53:22 +0000
changeset 2368 e0750b23c9e6
parent 2266 289dc8e51210
child 2421 a4b039ee2eb0
permissions -rw-r--r--
Move connect call to more appropriate place
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
typedef struct {
2260
31756e21c436 other indentation, binding and miscellaneous fixes to openalbridge
koda
parents: 2257
diff changeset
    21
    unsigned char *data;
31756e21c436 other indentation, binding and miscellaneous fixes to openalbridge
koda
parents: 2257
diff changeset
    22
    int storage;
31756e21c436 other indentation, binding and miscellaneous fixes to openalbridge
koda
parents: 2257
diff changeset
    23
    int fill;
31756e21c436 other indentation, binding and miscellaneous fixes to openalbridge
koda
parents: 2257
diff changeset
    24
    int returned;
31756e21c436 other indentation, binding and miscellaneous fixes to openalbridge
koda
parents: 2257
diff changeset
    25
    int unsynced;
31756e21c436 other indentation, binding and miscellaneous fixes to openalbridge
koda
parents: 2257
diff changeset
    26
    int headerbytes;
31756e21c436 other indentation, binding and miscellaneous fixes to openalbridge
koda
parents: 2257
diff changeset
    27
    int bodybytes;
2213
bd51bbf06033 -Smaxx's porting of the library to MSVC compilers
koda
parents:
diff changeset
    28
} ogg_sync_state;
bd51bbf06033 -Smaxx's porting of the library to MSVC compilers
koda
parents:
diff changeset
    29
typedef struct vorbis_info{
2260
31756e21c436 other indentation, binding and miscellaneous fixes to openalbridge
koda
parents: 2257
diff changeset
    30
    int version;
31756e21c436 other indentation, binding and miscellaneous fixes to openalbridge
koda
parents: 2257
diff changeset
    31
    int channels;
31756e21c436 other indentation, binding and miscellaneous fixes to openalbridge
koda
parents: 2257
diff changeset
    32
    long rate;
31756e21c436 other indentation, binding and miscellaneous fixes to openalbridge
koda
parents: 2257
diff changeset
    33
    /* The below bitrate declarations are *hints*.
2265
eae64600fb69 fix a bug where a fclose() was called after an ov_clear()
koda
parents: 2260
diff changeset
    34
     Combinations of the three values carry the following implications: all three set to the same value: implies a fixed rate bitstream
2260
31756e21c436 other indentation, binding and miscellaneous fixes to openalbridge
koda
parents: 2257
diff changeset
    35
     only nominal set: implies a VBR stream that averages the nominal bitrate.  No hard upper/lower limit
31756e21c436 other indentation, binding and miscellaneous fixes to openalbridge
koda
parents: 2257
diff changeset
    36
     upper and or lower set: implies a VBR bitstream that obeys the bitrate limits. nominal may also be set to give a nominal rate.
31756e21c436 other indentation, binding and miscellaneous fixes to openalbridge
koda
parents: 2257
diff changeset
    37
     none set: the coder does not care to speculate. */
31756e21c436 other indentation, binding and miscellaneous fixes to openalbridge
koda
parents: 2257
diff changeset
    38
    long bitrate_upper;
31756e21c436 other indentation, binding and miscellaneous fixes to openalbridge
koda
parents: 2257
diff changeset
    39
    long bitrate_nominal;
31756e21c436 other indentation, binding and miscellaneous fixes to openalbridge
koda
parents: 2257
diff changeset
    40
    long bitrate_lower;
31756e21c436 other indentation, binding and miscellaneous fixes to openalbridge
koda
parents: 2257
diff changeset
    41
    long bitrate_window;
31756e21c436 other indentation, binding and miscellaneous fixes to openalbridge
koda
parents: 2257
diff changeset
    42
    void *codec_setup;
2213
bd51bbf06033 -Smaxx's porting of the library to MSVC compilers
koda
parents:
diff changeset
    43
} vorbis_info;
bd51bbf06033 -Smaxx's porting of the library to MSVC compilers
koda
parents:
diff changeset
    44
typedef struct vorbis_comment{
2260
31756e21c436 other indentation, binding and miscellaneous fixes to openalbridge
koda
parents: 2257
diff changeset
    45
    /* unlimited user comment fields.  libvorbis writes 'libvorbis' whatever vendor is set to in encode */
31756e21c436 other indentation, binding and miscellaneous fixes to openalbridge
koda
parents: 2257
diff changeset
    46
    char **user_comments;
31756e21c436 other indentation, binding and miscellaneous fixes to openalbridge
koda
parents: 2257
diff changeset
    47
    int   *comment_lengths;
31756e21c436 other indentation, binding and miscellaneous fixes to openalbridge
koda
parents: 2257
diff changeset
    48
    int    comments;
31756e21c436 other indentation, binding and miscellaneous fixes to openalbridge
koda
parents: 2257
diff changeset
    49
    char  *vendor;
2213
bd51bbf06033 -Smaxx's porting of the library to MSVC compilers
koda
parents:
diff changeset
    50
} vorbis_comment;
bd51bbf06033 -Smaxx's porting of the library to MSVC compilers
koda
parents:
diff changeset
    51
typedef struct {
2260
31756e21c436 other indentation, binding and miscellaneous fixes to openalbridge
koda
parents: 2257
diff changeset
    52
    unsigned char   *body_data;    /* bytes from packet bodies */
31756e21c436 other indentation, binding and miscellaneous fixes to openalbridge
koda
parents: 2257
diff changeset
    53
    long    body_storage;          /* storage elements allocated */
31756e21c436 other indentation, binding and miscellaneous fixes to openalbridge
koda
parents: 2257
diff changeset
    54
    long    body_fill;             /* elements stored; fill mark */
31756e21c436 other indentation, binding and miscellaneous fixes to openalbridge
koda
parents: 2257
diff changeset
    55
    long    body_returned;         /* elements of fill returned */
2265
eae64600fb69 fix a bug where a fclose() was called after an ov_clear()
koda
parents: 2260
diff changeset
    56
    int     *lacing_vals;      	   /* The values that will go to the segment table */
2260
31756e21c436 other indentation, binding and miscellaneous fixes to openalbridge
koda
parents: 2257
diff changeset
    57
    ogg_int64_t *granule_vals; 
2265
eae64600fb69 fix a bug where a fclose() was called after an ov_clear()
koda
parents: 2260
diff changeset
    58
    /* granulepos values for headers. Not compact this way, but it is simple coupled to the lacing fifo */
2260
31756e21c436 other indentation, binding and miscellaneous fixes to openalbridge
koda
parents: 2257
diff changeset
    59
    long    lacing_storage;
31756e21c436 other indentation, binding and miscellaneous fixes to openalbridge
koda
parents: 2257
diff changeset
    60
    long    lacing_fill;
31756e21c436 other indentation, binding and miscellaneous fixes to openalbridge
koda
parents: 2257
diff changeset
    61
    long    lacing_packet;
31756e21c436 other indentation, binding and miscellaneous fixes to openalbridge
koda
parents: 2257
diff changeset
    62
    long    lacing_returned;
31756e21c436 other indentation, binding and miscellaneous fixes to openalbridge
koda
parents: 2257
diff changeset
    63
    unsigned char    header[282];      /* working space for header encode */
31756e21c436 other indentation, binding and miscellaneous fixes to openalbridge
koda
parents: 2257
diff changeset
    64
    int              header_fill;
31756e21c436 other indentation, binding and miscellaneous fixes to openalbridge
koda
parents: 2257
diff changeset
    65
    int     e_o_s;          /* set when we have buffered the last packet in the logical bitstream */
31756e21c436 other indentation, binding and miscellaneous fixes to openalbridge
koda
parents: 2257
diff changeset
    66
    int     b_o_s;          /* set after we've written the initial page of a logical bitstream */
31756e21c436 other indentation, binding and miscellaneous fixes to openalbridge
koda
parents: 2257
diff changeset
    67
    long    serialno;
31756e21c436 other indentation, binding and miscellaneous fixes to openalbridge
koda
parents: 2257
diff changeset
    68
    long    pageno;
31756e21c436 other indentation, binding and miscellaneous fixes to openalbridge
koda
parents: 2257
diff changeset
    69
    ogg_int64_t  packetno;      
31756e21c436 other indentation, binding and miscellaneous fixes to openalbridge
koda
parents: 2257
diff changeset
    70
    /* sequence number for decode; the framing knows where there's a hole in the data,
31756e21c436 other indentation, binding and miscellaneous fixes to openalbridge
koda
parents: 2257
diff changeset
    71
     but we need coupling so that the codec (which is in a seperate abstraction layer) also knows about the gap */
31756e21c436 other indentation, binding and miscellaneous fixes to openalbridge
koda
parents: 2257
diff changeset
    72
    ogg_int64_t   granulepos;
2213
bd51bbf06033 -Smaxx's porting of the library to MSVC compilers
koda
parents:
diff changeset
    73
} ogg_stream_state;
bd51bbf06033 -Smaxx's porting of the library to MSVC compilers
koda
parents:
diff changeset
    74
typedef struct vorbis_dsp_state{
2260
31756e21c436 other indentation, binding and miscellaneous fixes to openalbridge
koda
parents: 2257
diff changeset
    75
    int analysisp;
31756e21c436 other indentation, binding and miscellaneous fixes to openalbridge
koda
parents: 2257
diff changeset
    76
    vorbis_info *vi;
31756e21c436 other indentation, binding and miscellaneous fixes to openalbridge
koda
parents: 2257
diff changeset
    77
    float **pcm;
31756e21c436 other indentation, binding and miscellaneous fixes to openalbridge
koda
parents: 2257
diff changeset
    78
    float **pcmret;
31756e21c436 other indentation, binding and miscellaneous fixes to openalbridge
koda
parents: 2257
diff changeset
    79
    int  pcm_storage;
31756e21c436 other indentation, binding and miscellaneous fixes to openalbridge
koda
parents: 2257
diff changeset
    80
    int  pcm_current;
31756e21c436 other indentation, binding and miscellaneous fixes to openalbridge
koda
parents: 2257
diff changeset
    81
    int  pcm_returned;
31756e21c436 other indentation, binding and miscellaneous fixes to openalbridge
koda
parents: 2257
diff changeset
    82
    int  preextrapolate;
31756e21c436 other indentation, binding and miscellaneous fixes to openalbridge
koda
parents: 2257
diff changeset
    83
    int  eofflag;
31756e21c436 other indentation, binding and miscellaneous fixes to openalbridge
koda
parents: 2257
diff changeset
    84
    long lW;
31756e21c436 other indentation, binding and miscellaneous fixes to openalbridge
koda
parents: 2257
diff changeset
    85
    long W;
31756e21c436 other indentation, binding and miscellaneous fixes to openalbridge
koda
parents: 2257
diff changeset
    86
    long nW;
31756e21c436 other indentation, binding and miscellaneous fixes to openalbridge
koda
parents: 2257
diff changeset
    87
    long centerW;
31756e21c436 other indentation, binding and miscellaneous fixes to openalbridge
koda
parents: 2257
diff changeset
    88
    ogg_int64_t granulepos;
31756e21c436 other indentation, binding and miscellaneous fixes to openalbridge
koda
parents: 2257
diff changeset
    89
    ogg_int64_t sequence;
31756e21c436 other indentation, binding and miscellaneous fixes to openalbridge
koda
parents: 2257
diff changeset
    90
    ogg_int64_t glue_bits;
31756e21c436 other indentation, binding and miscellaneous fixes to openalbridge
koda
parents: 2257
diff changeset
    91
    ogg_int64_t time_bits;
31756e21c436 other indentation, binding and miscellaneous fixes to openalbridge
koda
parents: 2257
diff changeset
    92
    ogg_int64_t floor_bits;
31756e21c436 other indentation, binding and miscellaneous fixes to openalbridge
koda
parents: 2257
diff changeset
    93
    ogg_int64_t res_bits;
31756e21c436 other indentation, binding and miscellaneous fixes to openalbridge
koda
parents: 2257
diff changeset
    94
    void       *backend_state;
2213
bd51bbf06033 -Smaxx's porting of the library to MSVC compilers
koda
parents:
diff changeset
    95
} vorbis_dsp_state;
bd51bbf06033 -Smaxx's porting of the library to MSVC compilers
koda
parents:
diff changeset
    96
typedef struct {
2260
31756e21c436 other indentation, binding and miscellaneous fixes to openalbridge
koda
parents: 2257
diff changeset
    97
    long endbyte;
31756e21c436 other indentation, binding and miscellaneous fixes to openalbridge
koda
parents: 2257
diff changeset
    98
    int  endbit;
31756e21c436 other indentation, binding and miscellaneous fixes to openalbridge
koda
parents: 2257
diff changeset
    99
    unsigned char *buffer;
31756e21c436 other indentation, binding and miscellaneous fixes to openalbridge
koda
parents: 2257
diff changeset
   100
    unsigned char *ptr;
31756e21c436 other indentation, binding and miscellaneous fixes to openalbridge
koda
parents: 2257
diff changeset
   101
    long storage;
2213
bd51bbf06033 -Smaxx's porting of the library to MSVC compilers
koda
parents:
diff changeset
   102
} oggpack_buffer;
bd51bbf06033 -Smaxx's porting of the library to MSVC compilers
koda
parents:
diff changeset
   103
typedef struct vorbis_block{
2260
31756e21c436 other indentation, binding and miscellaneous fixes to openalbridge
koda
parents: 2257
diff changeset
   104
    /* necessary stream state for linking to the framing abstraction */
31756e21c436 other indentation, binding and miscellaneous fixes to openalbridge
koda
parents: 2257
diff changeset
   105
    float **pcm;       /* this is a pointer into local storage */
31756e21c436 other indentation, binding and miscellaneous fixes to openalbridge
koda
parents: 2257
diff changeset
   106
    oggpack_buffer opb;
31756e21c436 other indentation, binding and miscellaneous fixes to openalbridge
koda
parents: 2257
diff changeset
   107
    long  lW;
31756e21c436 other indentation, binding and miscellaneous fixes to openalbridge
koda
parents: 2257
diff changeset
   108
    long  W;
31756e21c436 other indentation, binding and miscellaneous fixes to openalbridge
koda
parents: 2257
diff changeset
   109
    long  nW;
31756e21c436 other indentation, binding and miscellaneous fixes to openalbridge
koda
parents: 2257
diff changeset
   110
    int   pcmend;
31756e21c436 other indentation, binding and miscellaneous fixes to openalbridge
koda
parents: 2257
diff changeset
   111
    int   mode;
31756e21c436 other indentation, binding and miscellaneous fixes to openalbridge
koda
parents: 2257
diff changeset
   112
    int   eofflag;
31756e21c436 other indentation, binding and miscellaneous fixes to openalbridge
koda
parents: 2257
diff changeset
   113
    ogg_int64_t granulepos;
31756e21c436 other indentation, binding and miscellaneous fixes to openalbridge
koda
parents: 2257
diff changeset
   114
    ogg_int64_t sequence;
31756e21c436 other indentation, binding and miscellaneous fixes to openalbridge
koda
parents: 2257
diff changeset
   115
    vorbis_dsp_state *vd; /* For read-only access of configuration */
31756e21c436 other indentation, binding and miscellaneous fixes to openalbridge
koda
parents: 2257
diff changeset
   116
    /* local storage to avoid remallocing; it's up to the mapping to structure it */
31756e21c436 other indentation, binding and miscellaneous fixes to openalbridge
koda
parents: 2257
diff changeset
   117
    void  *localstore;
31756e21c436 other indentation, binding and miscellaneous fixes to openalbridge
koda
parents: 2257
diff changeset
   118
    long  localtop;
31756e21c436 other indentation, binding and miscellaneous fixes to openalbridge
koda
parents: 2257
diff changeset
   119
    long  localalloc;
31756e21c436 other indentation, binding and miscellaneous fixes to openalbridge
koda
parents: 2257
diff changeset
   120
    long  totaluse;
31756e21c436 other indentation, binding and miscellaneous fixes to openalbridge
koda
parents: 2257
diff changeset
   121
    struct alloc_chain *reap;
31756e21c436 other indentation, binding and miscellaneous fixes to openalbridge
koda
parents: 2257
diff changeset
   122
    /* bitmetrics for the frame */
31756e21c436 other indentation, binding and miscellaneous fixes to openalbridge
koda
parents: 2257
diff changeset
   123
    long glue_bits;
31756e21c436 other indentation, binding and miscellaneous fixes to openalbridge
koda
parents: 2257
diff changeset
   124
    long time_bits;
31756e21c436 other indentation, binding and miscellaneous fixes to openalbridge
koda
parents: 2257
diff changeset
   125
    long floor_bits;
31756e21c436 other indentation, binding and miscellaneous fixes to openalbridge
koda
parents: 2257
diff changeset
   126
    long res_bits;
31756e21c436 other indentation, binding and miscellaneous fixes to openalbridge
koda
parents: 2257
diff changeset
   127
    void *internal;
2213
bd51bbf06033 -Smaxx's porting of the library to MSVC compilers
koda
parents:
diff changeset
   128
} vorbis_block;
bd51bbf06033 -Smaxx's porting of the library to MSVC compilers
koda
parents:
diff changeset
   129
typedef struct {
2260
31756e21c436 other indentation, binding and miscellaneous fixes to openalbridge
koda
parents: 2257
diff changeset
   130
    size_t (*read_func)  (void *ptr, size_t size, size_t nmemb, void *datasource);
31756e21c436 other indentation, binding and miscellaneous fixes to openalbridge
koda
parents: 2257
diff changeset
   131
    int    (*seek_func)  (void *datasource, ogg_int64_t offset, int whence);
31756e21c436 other indentation, binding and miscellaneous fixes to openalbridge
koda
parents: 2257
diff changeset
   132
    int    (*close_func) (void *datasource);
31756e21c436 other indentation, binding and miscellaneous fixes to openalbridge
koda
parents: 2257
diff changeset
   133
    long   (*tell_func)  (void *datasource);
2213
bd51bbf06033 -Smaxx's porting of the library to MSVC compilers
koda
parents:
diff changeset
   134
} ov_callbacks;
bd51bbf06033 -Smaxx's porting of the library to MSVC compilers
koda
parents:
diff changeset
   135
typedef struct OggVorbis_File {
2260
31756e21c436 other indentation, binding and miscellaneous fixes to openalbridge
koda
parents: 2257
diff changeset
   136
    void            *datasource; /* Pointer to a FILE *, etc. */
31756e21c436 other indentation, binding and miscellaneous fixes to openalbridge
koda
parents: 2257
diff changeset
   137
    int              seekable;
31756e21c436 other indentation, binding and miscellaneous fixes to openalbridge
koda
parents: 2257
diff changeset
   138
    ogg_int64_t      offset;
31756e21c436 other indentation, binding and miscellaneous fixes to openalbridge
koda
parents: 2257
diff changeset
   139
    ogg_int64_t      end;
31756e21c436 other indentation, binding and miscellaneous fixes to openalbridge
koda
parents: 2257
diff changeset
   140
    ogg_sync_state   oy;
31756e21c436 other indentation, binding and miscellaneous fixes to openalbridge
koda
parents: 2257
diff changeset
   141
    /* If the FILE handle isn't seekable (eg, a pipe), only the current stream appears */
31756e21c436 other indentation, binding and miscellaneous fixes to openalbridge
koda
parents: 2257
diff changeset
   142
    int              links;
31756e21c436 other indentation, binding and miscellaneous fixes to openalbridge
koda
parents: 2257
diff changeset
   143
    ogg_int64_t     *offsets;
31756e21c436 other indentation, binding and miscellaneous fixes to openalbridge
koda
parents: 2257
diff changeset
   144
    ogg_int64_t     *dataoffsets;
31756e21c436 other indentation, binding and miscellaneous fixes to openalbridge
koda
parents: 2257
diff changeset
   145
    long            *serialnos;
31756e21c436 other indentation, binding and miscellaneous fixes to openalbridge
koda
parents: 2257
diff changeset
   146
    ogg_int64_t     *pcmlengths; 
31756e21c436 other indentation, binding and miscellaneous fixes to openalbridge
koda
parents: 2257
diff changeset
   147
    /* overloaded to maintain binary
31756e21c436 other indentation, binding and miscellaneous fixes to openalbridge
koda
parents: 2257
diff changeset
   148
     compatability; x2 size, stores both
31756e21c436 other indentation, binding and miscellaneous fixes to openalbridge
koda
parents: 2257
diff changeset
   149
     beginning and end values */
31756e21c436 other indentation, binding and miscellaneous fixes to openalbridge
koda
parents: 2257
diff changeset
   150
    vorbis_info     *vi;
31756e21c436 other indentation, binding and miscellaneous fixes to openalbridge
koda
parents: 2257
diff changeset
   151
    vorbis_comment  *vc;
31756e21c436 other indentation, binding and miscellaneous fixes to openalbridge
koda
parents: 2257
diff changeset
   152
    /* Decoding working state local storage */
31756e21c436 other indentation, binding and miscellaneous fixes to openalbridge
koda
parents: 2257
diff changeset
   153
    ogg_int64_t      pcm_offset;
31756e21c436 other indentation, binding and miscellaneous fixes to openalbridge
koda
parents: 2257
diff changeset
   154
    int              ready_state;
31756e21c436 other indentation, binding and miscellaneous fixes to openalbridge
koda
parents: 2257
diff changeset
   155
    long             current_serialno;
31756e21c436 other indentation, binding and miscellaneous fixes to openalbridge
koda
parents: 2257
diff changeset
   156
    int              current_link;
31756e21c436 other indentation, binding and miscellaneous fixes to openalbridge
koda
parents: 2257
diff changeset
   157
    double           bittrack;
31756e21c436 other indentation, binding and miscellaneous fixes to openalbridge
koda
parents: 2257
diff changeset
   158
    double           samptrack;
31756e21c436 other indentation, binding and miscellaneous fixes to openalbridge
koda
parents: 2257
diff changeset
   159
    ogg_stream_state os; /* take physical pages, weld into a logical stream of packets */
31756e21c436 other indentation, binding and miscellaneous fixes to openalbridge
koda
parents: 2257
diff changeset
   160
    vorbis_dsp_state vd; /* central working state for the packet->PCM decoder */
31756e21c436 other indentation, binding and miscellaneous fixes to openalbridge
koda
parents: 2257
diff changeset
   161
    vorbis_block     vb; /* local working space for packet->PCM decode */
31756e21c436 other indentation, binding and miscellaneous fixes to openalbridge
koda
parents: 2257
diff changeset
   162
    ov_callbacks callbacks;
2213
bd51bbf06033 -Smaxx's porting of the library to MSVC compilers
koda
parents:
diff changeset
   163
} OggVorbis_File;
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
bd51bbf06033 -Smaxx's porting of the library to MSVC compilers
koda
parents:
diff changeset
   166
extern int ov_open(FILE *f,OggVorbis_File *vf,char *initial,long ibytes);
2266
289dc8e51210 switch to ov_fopen for simplicity
koda
parents: 2265
diff changeset
   167
extern int ov_fopen(char *path,OggVorbis_File *vf);
2213
bd51bbf06033 -Smaxx's porting of the library to MSVC compilers
koda
parents:
diff changeset
   168
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
   169
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
   170
extern vorbis_info *ov_info(OggVorbis_File *vf,int link);
bd51bbf06033 -Smaxx's porting of the library to MSVC compilers
koda
parents:
diff changeset
   171
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
   172
extern int ov_clear(OggVorbis_File *vf);
2213
bd51bbf06033 -Smaxx's porting of the library to MSVC compilers
koda
parents:
diff changeset
   173
bd51bbf06033 -Smaxx's porting of the library to MSVC compilers
koda
parents:
diff changeset
   174
#endif /*_OGGVORBIS_H*/