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
     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 
    24 #ifndef OV_EXCLUDE_STATIC_CALLBACKS
    25 #define OV_EXCLUDE_STATIC_CALLBACKS
    26 #endif
    27 #ifdef OGG_USE_TREMOR
    28 #include <tremor/ivorbisfile.h>
    29 #else
    30 #include <vorbis/vorbisfile.h>
    31 #endif
    32 
    33 typedef struct {
    34 	int loaded;
    35 	void *handle;
    36 	int (*ov_clear)(OggVorbis_File *vf);
    37 	vorbis_info *(*ov_info)(OggVorbis_File *vf,int link);
    38 	int (*ov_open_callbacks)(void *datasource, OggVorbis_File *vf, const char *initial, long ibytes, ov_callbacks callbacks);
    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();