dynamic_ogg.h
author Sam Lantinga <slouken@libsdl.org>
Sat, 16 Aug 2014 22:46:16 -0700
changeset 695 6a5e6d8d6a35
parent 626 1da1d92ffa9c
child 711 f40c5ac95b12
permissions -rw-r--r--
Fixed bug 2136 and 2624, include directives are wrong for tremor and modplug on Debian
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@695
    23
#if defined(OGG_HEADER)
slouken@695
    24
#include OGG_HEADER
slouken@695
    25
#elif defined(OGG_USE_TREMOR)
slouken@695
    26
#include <tremor/ivorbisfile.h>
slouken@353
    27
#else
slouken@312
    28
#include <vorbis/vorbisfile.h>
slouken@353
    29
#endif
slouken@312
    30
slouken@312
    31
typedef struct {
slouken@617
    32
    int loaded;
slouken@617
    33
    void *handle;
slouken@617
    34
    int (*ov_clear)(OggVorbis_File *vf);
slouken@617
    35
    vorbis_info *(*ov_info)(OggVorbis_File *vf,int link);
slouken@617
    36
    int (*ov_open_callbacks)(void *datasource, OggVorbis_File *vf, const char *initial, long ibytes, ov_callbacks callbacks);
slouken@617
    37
    ogg_int64_t (*ov_pcm_total)(OggVorbis_File *vf,int i);
slouken@353
    38
#ifdef OGG_USE_TREMOR
slouken@617
    39
    long (*ov_read)(OggVorbis_File *vf,char *buffer,int length, int *bitstream);
slouken@353
    40
#else
slouken@617
    41
    long (*ov_read)(OggVorbis_File *vf,char *buffer,int length, int bigendianp,int word,int sgned,int *bitstream);
slouken@353
    42
#endif
slouken@505
    43
#ifdef OGG_USE_TREMOR
slouken@617
    44
    int (*ov_time_seek)(OggVorbis_File *vf,ogg_int64_t pos);
slouken@505
    45
#else
slouken@617
    46
    int (*ov_time_seek)(OggVorbis_File *vf,double pos);
slouken@505
    47
#endif
slouken@312
    48
} vorbis_loader;
slouken@312
    49
slouken@312
    50
extern vorbis_loader vorbis;
slouken@312
    51
slouken@470
    52
#endif /* OGG_MUSIC */
slouken@470
    53
slouken@312
    54
extern int Mix_InitOgg();
slouken@312
    55
extern void Mix_QuitOgg();