1 | /*
|
---|
2 | SDL_mixer: An audio mixer library based on the SDL library
|
---|
3 | Copyright (C) 1997-2012 Sam Lantinga <slouken@libsdl.org>
|
---|
4 |
|
---|
5 | This software is provided 'as-is', without any express or implied
|
---|
6 | warranty. In no event will the authors be held liable for any damages
|
---|
7 | arising from the use of this software.
|
---|
8 |
|
---|
9 | Permission is granted to anyone to use this software for any purpose,
|
---|
10 | including commercial applications, and to alter it and redistribute it
|
---|
11 | freely, subject to the following restrictions:
|
---|
12 |
|
---|
13 | 1. The origin of this software must not be misrepresented; you must not
|
---|
14 | claim that you wrote the original software. If you use this software
|
---|
15 | in a product, an acknowledgment in the product documentation would be
|
---|
16 | appreciated but is not required.
|
---|
17 | 2. Altered source versions must be plainly marked as such, and must not be
|
---|
18 | misrepresented as being the original software.
|
---|
19 | 3. This notice may not be removed or altered from any source distribution.
|
---|
20 | */
|
---|
21 |
|
---|
22 | #ifdef OGG_MUSIC
|
---|
23 | #ifdef OGG_USE_TREMOR
|
---|
24 | #include <tremor/ivorbisfile.h>
|
---|
25 | #else
|
---|
26 | #include <vorbis/vorbisfile.h>
|
---|
27 | #endif
|
---|
28 |
|
---|
29 | typedef struct {
|
---|
30 | int loaded;
|
---|
31 | void *handle;
|
---|
32 | int (*ov_clear)(OggVorbis_File *vf);
|
---|
33 | vorbis_info *(*ov_info)(OggVorbis_File *vf,int link);
|
---|
34 | #ifdef __WATCOMC__
|
---|
35 | int (*ov_open_callbacks)(void *datasource, OggVorbis_File *vf, const char *initial, long ibytes, ov_callbacks callbacks);
|
---|
36 | #else
|
---|
37 | int (*ov_open_callbacks)(void *datasource, OggVorbis_File *vf, char *initial, long ibytes, ov_callbacks callbacks);
|
---|
38 | #endif
|
---|
39 | ogg_int64_t (*ov_pcm_total)(OggVorbis_File *vf,int i);
|
---|
40 | #ifdef OGG_USE_TREMOR
|
---|
41 | long (*ov_read)(OggVorbis_File *vf,char *buffer,int length, int *bitstream);
|
---|
42 | #else
|
---|
43 | long (*ov_read)(OggVorbis_File *vf,char *buffer,int length, int bigendianp,int word,int sgned,int *bitstream);
|
---|
44 | #endif
|
---|
45 | #ifdef OGG_USE_TREMOR
|
---|
46 | int (*ov_time_seek)(OggVorbis_File *vf,ogg_int64_t pos);
|
---|
47 | #else
|
---|
48 | int (*ov_time_seek)(OggVorbis_File *vf,double pos);
|
---|
49 | #endif
|
---|
50 | } vorbis_loader;
|
---|
51 |
|
---|
52 | extern vorbis_loader vorbis;
|
---|
53 |
|
---|
54 | #endif /* OGG_MUSIC */
|
---|
55 |
|
---|
56 | extern int Mix_InitOgg();
|
---|
57 | extern void Mix_QuitOgg();
|
---|