dynamic_ogg.h
author Sam Lantinga <slouken@libsdl.org>
Fri, 12 May 2006 06:14:15 +0000
changeset 312 8a536296ef3d
child 353 21fe62f9c4c6
permissions -rw-r--r--
Added support for dynamically loading Ogg Vorbis library
slouken@312
     1
/*
slouken@312
     2
    SDL_mixer:  An audio mixer library based on the SDL library
slouken@312
     3
    Copyright (C) 1997-2004 Sam Lantinga
slouken@312
     4
slouken@312
     5
    This library is free software; you can redistribute it and/or
slouken@312
     6
    modify it under the terms of the GNU Library General Public
slouken@312
     7
    License as published by the Free Software Foundation; either
slouken@312
     8
    version 2 of the License, or (at your option) any later version.
slouken@312
     9
slouken@312
    10
    This library is distributed in the hope that it will be useful,
slouken@312
    11
    but WITHOUT ANY WARRANTY; without even the implied warranty of
slouken@312
    12
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
slouken@312
    13
    Library General Public License for more details.
slouken@312
    14
slouken@312
    15
    You should have received a copy of the GNU Library General Public
slouken@312
    16
    License along with this library; if not, write to the Free
slouken@312
    17
    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
slouken@312
    18
slouken@312
    19
    Sam Lantinga
slouken@312
    20
    slouken@libsdl.org
slouken@312
    21
*/
slouken@312
    22
slouken@312
    23
#ifdef OGG_MUSIC
slouken@312
    24
#include <vorbis/vorbisfile.h>
slouken@312
    25
slouken@312
    26
typedef struct {
slouken@312
    27
	int loaded;
slouken@312
    28
	void *handle;
slouken@312
    29
	int (*ov_clear)(OggVorbis_File *vf);
slouken@312
    30
	vorbis_info *(*ov_info)(OggVorbis_File *vf,int link);
slouken@312
    31
	int (*ov_open)(FILE *f,OggVorbis_File *vf,char *initial,long ibytes);
slouken@312
    32
	int (*ov_open_callbacks)(void *datasource, OggVorbis_File *vf, char *initial, long ibytes, ov_callbacks callbacks);
slouken@312
    33
	ogg_int64_t (*ov_pcm_total)(OggVorbis_File *vf,int i);
slouken@312
    34
	long (*ov_read)(OggVorbis_File *vf,char *buffer,int length, int bigendianp,int word,int sgned,int *bitstream);
slouken@312
    35
	int (*ov_time_seek)(OggVorbis_File *vf,double pos);
slouken@312
    36
} vorbis_loader;
slouken@312
    37
slouken@312
    38
extern vorbis_loader vorbis;
slouken@312
    39
slouken@312
    40
extern int Mix_InitOgg();
slouken@312
    41
extern void Mix_QuitOgg();
slouken@312
    42
slouken@312
    43
#endif