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