
/*
	OggVorbis decoder interface file

	This file is always generated by gen_wuvorbisfile_h.pl
*/

#ifndef _WUVORBISFILE_H_
#define _WUVORBISFILE_H_

#include <stddef.h>


#ifdef __cplusplus
extern "C"
{
#endif

typedef __int64 wu_ogg_int64_t;

#ifndef IN_WUVORBISMAINUNIT
extern int WuVorbisInit(const char *dll_file_name_can_be_null);
extern int WuVorbisUninit(void);
extern int  (_stdcall* Query_sizeof_OggVorbis_File)(void);
#endif


#pragma pack(push, 4)

typedef struct
{
	char data[704 + 256];
} wu_OggVorbis_File;

typedef struct {
  size_t (_cdecl* read_func)  (void *ptr, size_t size, size_t nmemb, void *datasource);
  int    (_cdecl* seek_func)  (void *datasource, wu_ogg_int64_t offset, int whence);
  int    (_cdecl* close_func) (void *datasource);
  long   (_cdecl* tell_func)  (void *datasource);
} wu_ov_callbacks;

typedef struct wu_vorbis_info{
  int version;
  int channels;
  long rate;
  long bitrate_upper;
  long bitrate_nominal;
  long bitrate_lower;
  long bitrate_window;
  void *codec_setup;
} wu_vorbis_info;

typedef struct wu_vorbis_comment{
  char **user_comments;
  int   *comment_lengths;
  int    comments;
  char  *vendor;
} wu_vorbis_comment;

#define  WU_NOTOPEN   0
#define  WU_PARTOPEN  1
#define  WU_OPENED    2
#define  WU_STREAMSET 3
#define  WU_INITSET   4
#define WU_OV_FALSE      -1
#define WU_OV_EOF        -2
#define WU_OV_HOLE       -3
#define WU_OV_EREAD      -128
#define WU_OV_EFAULT     -129
#define WU_OV_EIMPL      -130
#define WU_OV_EINVAL     -131
#define WU_OV_ENOTVORBIS -132
#define WU_OV_EBADHEADER -133
#define WU_OV_EVERSION   -134
#define WU_OV_ENOTAUDIO  -135
#define WU_OV_EBADPACKET -136
#define WU_OV_EBADLINK   -137
#define WU_OV_ENOSEEK    -138
#define WU_CPU_HAS_FPU 0x000010000
#define WU_CPU_HAS_MMX 0x000020000
#define WU_CPU_HAS_3DN 0x000040000
#define WU_CPU_HAS_SSE 0x000080000
#define WU_CPU_HAS_CMOV 0x000100000
#define WU_CPU_HAS_E3DN 0x000200000
#define WU_CPU_HAS_EMMX 0x000400000
#define WU_CPU_HAS_SSE2 0x000800000
#define WU_CPU_HAS_TSC 0x001000000
#define WU_CPU_FEATURE_MASK 0x0ffff0000
#define WU_CPU_IS_INTEL 0x000000010
#define WU_CPU_IS_AMD 0x000000020
#define WU_CPU_IS_IDT 0x000000030
#define WU_CPU_IS_CYRIX 0x000000040
#define WU_CPU_IS_NEXGEN 0x000000050
#define WU_CPU_IS_RISE 0x000000060
#define WU_CPU_IS_UMC 0x000000070
#define WU_CPU_IS_TRANSMETA 0x000000080
#define WU_CPU_IS_UNKNOWN 0x000000000
#define WU_CPU_VENDOR_MASK 0x000000ff0
#define WU_CPU_FAMILY_MASK 0x00000000f

#pragma pack(pop)

#ifndef IN_WUVORBISMAINUNIT
extern int  (_cdecl *wu_ov_clear)(wu_OggVorbis_File *vf);
extern int  (_cdecl *wu_ov_open_callbacks)(void *datasource, wu_OggVorbis_File *vf,		char *initial, long ibytes, wu_ov_callbacks callbacks);
extern int  (_cdecl *wu_ov_test_callbacks)(void *datasource, wu_OggVorbis_File *vf,		char *initial, long ibytes, wu_ov_callbacks callbacks);
extern int  (_cdecl *wu_ov_test_open)(wu_OggVorbis_File *vf);
extern long  (_cdecl *wu_ov_bitrate)(wu_OggVorbis_File *vf,int i);
extern long  (_cdecl *wu_ov_bitrate_instant)(wu_OggVorbis_File *vf);
extern long  (_cdecl *wu_ov_streams)(wu_OggVorbis_File *vf);
extern long  (_cdecl *wu_ov_seekable)(wu_OggVorbis_File *vf);
extern long  (_cdecl *wu_ov_serialnumber)(wu_OggVorbis_File *vf,int i);
extern wu_ogg_int64_t  (_cdecl *wu_ov_raw_total)(wu_OggVorbis_File *vf,int i);
extern wu_ogg_int64_t  (_cdecl *wu_ov_pcm_total)(wu_OggVorbis_File *vf,int i);
extern double  (_cdecl *wu_ov_time_total)(wu_OggVorbis_File *vf,int i);
extern int  (_cdecl *wu_ov_raw_seek)(wu_OggVorbis_File *vf,wu_ogg_int64_t pos);
extern int  (_cdecl *wu_ov_pcm_seek)(wu_OggVorbis_File *vf,wu_ogg_int64_t pos);
extern int  (_cdecl *wu_ov_pcm_seek_page)(wu_OggVorbis_File *vf,wu_ogg_int64_t pos);
extern int  (_cdecl *wu_ov_time_seek)(wu_OggVorbis_File *vf,double pos);
extern int  (_cdecl *wu_ov_time_seek_page)(wu_OggVorbis_File *vf,double pos);
extern int  (_cdecl *wu_ov_raw_seek_lap)(wu_OggVorbis_File *vf,wu_ogg_int64_t pos);
extern int  (_cdecl *wu_ov_pcm_seek_lap)(wu_OggVorbis_File *vf,wu_ogg_int64_t pos);
extern int  (_cdecl *wu_ov_pcm_seek_page_lap)(wu_OggVorbis_File *vf,wu_ogg_int64_t pos);
extern int  (_cdecl *wu_ov_time_seek_lap)(wu_OggVorbis_File *vf,double pos);
extern int  (_cdecl *wu_ov_time_seek_page_lap)(wu_OggVorbis_File *vf,double pos);
extern wu_ogg_int64_t  (_cdecl *wu_ov_raw_tell)(wu_OggVorbis_File *vf);
extern wu_ogg_int64_t  (_cdecl *wu_ov_pcm_tell)(wu_OggVorbis_File *vf);
extern double  (_cdecl *wu_ov_time_tell)(wu_OggVorbis_File *vf);
extern wu_vorbis_info * (_cdecl *wu_ov_info)(wu_OggVorbis_File *vf,int link);
extern wu_vorbis_comment * (_cdecl *wu_ov_comment)(wu_OggVorbis_File *vf,int link);
extern long  (_cdecl *wu_ov_read_float)(wu_OggVorbis_File *vf,float ***pcm_channels,int samples,			  int *bitstream);
extern long  (_cdecl *wu_ov_read)(wu_OggVorbis_File *vf,char *buffer,int length,		    int bigendianp,int word,int sgned,int *bitstream);
extern int  (_cdecl *wu_ov_crosslap)(wu_OggVorbis_File *vf1,wu_OggVorbis_File *vf2);
extern int  (_cdecl *wu_ov_halfrate)(wu_OggVorbis_File *vf,int flag);
extern int  (_cdecl *wu_ov_halfrate_p)(wu_OggVorbis_File *vf);
extern void  (_cdecl *wu_SetCPUType)(unsigned __int32 type);
extern unsigned __int32  (_cdecl *wu_DetectCPU)(void);
extern void  (_cdecl *wu_ScaleOutput)(float scale);
#endif

#ifdef __cplusplus
}
#endif /* __cplusplus */

#endif


