dynamic_ogg.h
author Ozkan Sezer <sezeroz@gmail.com>
Sun, 28 Oct 2018 09:28:02 +0300
branchSDL-1.2
changeset 920 6d8ba24cbbd6
parent 886 cb08fb0976e6
permissions -rw-r--r--
ogg music: #define OV_EXCLUDE_STATIC_CALLBACKS
slouken@312
     1
/*
slouken@518
     2
  SDL_mixer:  An audio mixer library based on the SDL library
slouken@518
     3
  Copyright (C) 1997-2012 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
sezeroz@920
    23
sezeroz@920
    24
#ifndef OV_EXCLUDE_STATIC_CALLBACKS
sezeroz@920
    25
#define OV_EXCLUDE_STATIC_CALLBACKS
sezeroz@920
    26
#endif
slouken@353
    27
#ifdef OGG_USE_TREMOR
slouken@353
    28
#include <tremor/ivorbisfile.h>
slouken@353
    29
#else
slouken@312
    30
#include <vorbis/vorbisfile.h>
slouken@353
    31
#endif
slouken@312
    32
slouken@312
    33
typedef struct {
slouken@312
    34
	int loaded;
slouken@312
    35
	void *handle;
slouken@312
    36
	int (*ov_clear)(OggVorbis_File *vf);
slouken@312
    37
	vorbis_info *(*ov_info)(OggVorbis_File *vf,int link);
sezeroz@886
    38
	int (*ov_open_callbacks)(void *datasource, OggVorbis_File *vf, const char *initial, long ibytes, ov_callbacks callbacks);
slouken@312
    39
	ogg_int64_t (*ov_pcm_total)(OggVorbis_File *vf,int i);
slouken@353
    40
#ifdef OGG_USE_TREMOR
slouken@353
    41
	long (*ov_read)(OggVorbis_File *vf,char *buffer,int length, int *bitstream);
slouken@353
    42
#else
slouken@312
    43
	long (*ov_read)(OggVorbis_File *vf,char *buffer,int length, int bigendianp,int word,int sgned,int *bitstream);
slouken@353
    44
#endif
slouken@505
    45
#ifdef OGG_USE_TREMOR
slouken@505
    46
	int (*ov_time_seek)(OggVorbis_File *vf,ogg_int64_t pos);
slouken@505
    47
#else
slouken@312
    48
	int (*ov_time_seek)(OggVorbis_File *vf,double pos);
slouken@505
    49
#endif
slouken@312
    50
} vorbis_loader;
slouken@312
    51
slouken@312
    52
extern vorbis_loader vorbis;
slouken@312
    53
slouken@470
    54
#endif /* OGG_MUSIC */
slouken@470
    55
slouken@312
    56
extern int Mix_InitOgg();
slouken@312
    57
extern void Mix_QuitOgg();