dynamic_ogg.h
author Sam Lantinga <slouken@libsdl.org>
Mon, 19 Oct 2009 01:03:40 +0000
changeset 462 028b317d01d2
parent 386 695494546b3c
child 470 5cebd6c5be2d
permissions -rw-r--r--
Added the AudioUnit framework for the native MIDI code.
slouken@312
     1
/*
slouken@312
     2
    SDL_mixer:  An audio mixer library based on the SDL library
slouken@386
     3
    Copyright (C) 1997-2009 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@353
    24
#ifdef OGG_USE_TREMOR
slouken@353
    25
#include <tremor/ivorbisfile.h>
slouken@353
    26
#else
slouken@312
    27
#include <vorbis/vorbisfile.h>
slouken@353
    28
#endif
slouken@312
    29
slouken@312
    30
typedef struct {
slouken@312
    31
	int loaded;
slouken@312
    32
	void *handle;
slouken@312
    33
	int (*ov_clear)(OggVorbis_File *vf);
slouken@312
    34
	vorbis_info *(*ov_info)(OggVorbis_File *vf,int link);
slouken@312
    35
	int (*ov_open_callbacks)(void *datasource, OggVorbis_File *vf, char *initial, long ibytes, ov_callbacks callbacks);
slouken@312
    36
	ogg_int64_t (*ov_pcm_total)(OggVorbis_File *vf,int i);
slouken@353
    37
#ifdef OGG_USE_TREMOR
slouken@353
    38
	long (*ov_read)(OggVorbis_File *vf,char *buffer,int length, int *bitstream);
slouken@353
    39
#else
slouken@312
    40
	long (*ov_read)(OggVorbis_File *vf,char *buffer,int length, int bigendianp,int word,int sgned,int *bitstream);
slouken@353
    41
#endif
slouken@312
    42
	int (*ov_time_seek)(OggVorbis_File *vf,double pos);
slouken@312
    43
} vorbis_loader;
slouken@312
    44
slouken@312
    45
extern vorbis_loader vorbis;
slouken@312
    46
slouken@312
    47
extern int Mix_InitOgg();
slouken@312
    48
extern void Mix_QuitOgg();
slouken@312
    49
slouken@312
    50
#endif