dynamic_ogg.h
author Sam Lantinga <slouken@libsdl.org>
Sat, 02 Jan 2016 22:12:31 -0800
changeset 712 7e59d684b070
parent 711 f40c5ac95b12
child 725 bdf7b8d20566
permissions -rw-r--r--
Updated to version 2.0.1
     1 /*
     2   SDL_mixer:  An audio mixer library based on the SDL library
     3   Copyright (C) 1997-2016 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 #if defined(OGG_HEADER)
    24 #include OGG_HEADER
    25 #elif defined(OGG_USE_TREMOR)
    26 #include <tremor/ivorbisfile.h>
    27 #else
    28 #include <vorbis/vorbisfile.h>
    29 #endif
    30 
    31 typedef struct {
    32     int loaded;
    33     void *handle;
    34     int (*ov_clear)(OggVorbis_File *vf);
    35     vorbis_info *(*ov_info)(OggVorbis_File *vf,int link);
    36     int (*ov_open_callbacks)(void *datasource, OggVorbis_File *vf, const char *initial, long ibytes, ov_callbacks callbacks);
    37     ogg_int64_t (*ov_pcm_total)(OggVorbis_File *vf,int i);
    38 #ifdef OGG_USE_TREMOR
    39     long (*ov_read)(OggVorbis_File *vf,char *buffer,int length, int *bitstream);
    40 #else
    41     long (*ov_read)(OggVorbis_File *vf,char *buffer,int length, int bigendianp,int word,int sgned,int *bitstream);
    42 #endif
    43 #ifdef OGG_USE_TREMOR
    44     int (*ov_time_seek)(OggVorbis_File *vf,ogg_int64_t pos);
    45 #else
    46     int (*ov_time_seek)(OggVorbis_File *vf,double pos);
    47 #endif
    48 } vorbis_loader;
    49 
    50 extern vorbis_loader vorbis;
    51 
    52 #endif /* OGG_MUSIC */
    53 
    54 extern int Mix_InitOgg();
    55 extern void Mix_QuitOgg();