music_ogg.c
author Sam Lantinga <slouken@libsdl.org>
Fri, 04 Jan 2019 22:02:19 -0800
changeset 926 d6c9518fb5ee
parent 921 cab8eaca3eac
permissions -rw-r--r--
Updated copyright for 2019
slouken@63
     1
/*
slouken@518
     2
  SDL_mixer:  An audio mixer library based on the SDL library
slouken@926
     3
  Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
slouken@63
     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@63
     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@63
    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@63
    20
*/
slouken@63
    21
slouken@777
    22
#ifdef MUSIC_OGG
slouken@63
    23
slouken@63
    24
/* This file supports Ogg Vorbis music streams */
slouken@63
    25
slouken@777
    26
#include "SDL_loadso.h"
slouken@63
    27
slouken@63
    28
#include "music_ogg.h"
slouken@63
    29
sezeroz@921
    30
#define OV_EXCLUDE_STATIC_CALLBACKS
slouken@777
    31
#if defined(OGG_HEADER)
slouken@777
    32
#include OGG_HEADER
slouken@777
    33
#elif defined(OGG_USE_TREMOR)
slouken@777
    34
#include <tremor/ivorbisfile.h>
slouken@777
    35
#else
slouken@777
    36
#include <vorbis/vorbisfile.h>
slouken@777
    37
#endif
slouken@63
    38
slouken@777
    39
typedef struct {
slouken@777
    40
    int loaded;
slouken@777
    41
    void *handle;
slouken@777
    42
    int (*ov_clear)(OggVorbis_File *vf);
slouken@777
    43
    vorbis_info *(*ov_info)(OggVorbis_File *vf,int link);
v-novichkov@795
    44
    vorbis_comment *(*ov_comment)(OggVorbis_File *vf,int link);
slouken@777
    45
    int (*ov_open_callbacks)(void *datasource, OggVorbis_File *vf, const char *initial, long ibytes, ov_callbacks callbacks);
slouken@777
    46
    ogg_int64_t (*ov_pcm_total)(OggVorbis_File *vf,int i);
slouken@777
    47
#ifdef OGG_USE_TREMOR
slouken@777
    48
    long (*ov_read)(OggVorbis_File *vf,char *buffer,int length, int *bitstream);
slouken@777
    49
#else
slouken@777
    50
    long (*ov_read)(OggVorbis_File *vf,char *buffer,int length, int bigendianp,int word,int sgned,int *bitstream);
slouken@777
    51
#endif
slouken@777
    52
#ifdef OGG_USE_TREMOR
slouken@777
    53
    int (*ov_time_seek)(OggVorbis_File *vf,ogg_int64_t pos);
slouken@777
    54
#else
slouken@777
    55
    int (*ov_time_seek)(OggVorbis_File *vf,double pos);
slouken@777
    56
#endif
v-novichkov@795
    57
    int (*ov_pcm_seek)(OggVorbis_File *vf, ogg_int64_t pos);
v-novichkov@795
    58
    ogg_int64_t (*ov_pcm_tell)(OggVorbis_File *vf);
slouken@777
    59
} vorbis_loader;
slouken@777
    60
slouken@777
    61
static vorbis_loader vorbis = {
slouken@777
    62
    0, NULL
slouken@777
    63
};
slouken@777
    64
slouken@777
    65
#ifdef OGG_DYNAMIC
slouken@798
    66
#define FUNCTION_LOADER(FUNC, SIG) \
slouken@798
    67
    vorbis.FUNC = (SIG) SDL_LoadFunction(vorbis.handle, #FUNC); \
slouken@798
    68
    if (vorbis.FUNC == NULL) { SDL_UnloadObject(vorbis.handle); return -1; }
slouken@798
    69
#else
slouken@798
    70
#define FUNCTION_LOADER(FUNC, SIG) \
slouken@798
    71
    vorbis.FUNC = FUNC;
slouken@798
    72
#endif
slouken@777
    73
slouken@777
    74
static int OGG_Load(void)
slouken@63
    75
{
slouken@777
    76
    if (vorbis.loaded == 0) {
slouken@798
    77
#ifdef OGG_DYNAMIC
slouken@777
    78
        vorbis.handle = SDL_LoadObject(OGG_DYNAMIC);
slouken@777
    79
        if (vorbis.handle == NULL) {
slouken@777
    80
            return -1;
slouken@777
    81
        }
slouken@798
    82
#elif defined(__MACOSX__)
slouken@798
    83
        extern int ov_open_callbacks(void*, OggVorbis_File*, const char*, long, ov_callbacks) __attribute__((weak_import));
slouken@798
    84
        if (ov_open_callbacks == NULL)
slouken@798
    85
        {
slouken@798
    86
            /* Missing weakly linked framework */
slouken@798
    87
            Mix_SetError("Missing Vorbis.framework");
slouken@777
    88
            return -1;
slouken@777
    89
        }
slouken@798
    90
#endif
slouken@798
    91
        FUNCTION_LOADER(ov_clear, int (*)(OggVorbis_File *))
slouken@798
    92
        FUNCTION_LOADER(ov_info, vorbis_info *(*)(OggVorbis_File *,int))
slouken@798
    93
        FUNCTION_LOADER(ov_comment, vorbis_comment *(*)(OggVorbis_File *,int))
slouken@798
    94
        FUNCTION_LOADER(ov_open_callbacks, int (*)(void *, OggVorbis_File *, const char *, long, ov_callbacks))
slouken@798
    95
        FUNCTION_LOADER(ov_pcm_total, ogg_int64_t (*)(OggVorbis_File *,int))
slouken@777
    96
#ifdef OGG_USE_TREMOR
slouken@800
    97
        FUNCTION_LOADER(ov_read, long (*)(OggVorbis_File *,char *,int,int *))
slouken@800
    98
        FUNCTION_LOADER(ov_time_seek, long (*)(OggVorbis_File *,ogg_int64_t))
slouken@777
    99
#else
slouken@800
   100
        FUNCTION_LOADER(ov_read, long (*)(OggVorbis_File *,char *,int,int,int,int,int *))
slouken@800
   101
        FUNCTION_LOADER(ov_time_seek, int (*)(OggVorbis_File *,double))
slouken@777
   102
#endif
slouken@798
   103
        FUNCTION_LOADER(ov_pcm_seek, int (*)(OggVorbis_File *,ogg_int64_t))
slouken@798
   104
        FUNCTION_LOADER(ov_pcm_tell, ogg_int64_t (*)(OggVorbis_File *))
slouken@777
   105
    }
slouken@777
   106
    ++vorbis.loaded;
slouken@777
   107
slouken@777
   108
    return 0;
slouken@63
   109
}
slouken@63
   110
slouken@777
   111
static void OGG_Unload(void)
slouken@63
   112
{
slouken@777
   113
    if (vorbis.loaded == 0) {
slouken@777
   114
        return;
slouken@777
   115
    }
slouken@777
   116
    if (vorbis.loaded == 1) {
slouken@798
   117
#ifdef OGG_DYNAMIC
slouken@777
   118
        SDL_UnloadObject(vorbis.handle);
slouken@798
   119
#endif
slouken@777
   120
    }
slouken@777
   121
    --vorbis.loaded;
slouken@63
   122
}
slouken@63
   123
slouken@777
   124
slouken@777
   125
typedef struct {
slouken@777
   126
    SDL_RWops *src;
slouken@777
   127
    int freesrc;
slouken@797
   128
    int play_count;
slouken@777
   129
    int volume;
slouken@777
   130
    OggVorbis_File vf;
slouken@797
   131
    vorbis_info vi;
slouken@777
   132
    int section;
slouken@797
   133
    SDL_AudioStream *stream;
slouken@797
   134
    char *buffer;
slouken@797
   135
    int buffer_size;
v-novichkov@795
   136
    int loop;
v-novichkov@795
   137
    ogg_int64_t loop_start;
v-novichkov@795
   138
    ogg_int64_t loop_end;
v-novichkov@795
   139
    ogg_int64_t loop_len;
v-novichkov@795
   140
    ogg_int64_t channels;
slouken@777
   141
} OGG_music;
slouken@777
   142
slouken@797
   143
slouken@797
   144
static int set_ov_error(const char *function, int error)
slouken@797
   145
{
slouken@797
   146
#define HANDLE_ERROR_CASE(X)    case X: Mix_SetError("%s: %s", function, #X); break;
slouken@797
   147
    switch (error) {
slouken@797
   148
    HANDLE_ERROR_CASE(OV_FALSE);
slouken@797
   149
    HANDLE_ERROR_CASE(OV_EOF);
slouken@797
   150
    HANDLE_ERROR_CASE(OV_HOLE);
slouken@797
   151
    HANDLE_ERROR_CASE(OV_EREAD);
slouken@797
   152
    HANDLE_ERROR_CASE(OV_EFAULT);
slouken@797
   153
    HANDLE_ERROR_CASE(OV_EIMPL);
slouken@797
   154
    HANDLE_ERROR_CASE(OV_EINVAL);
slouken@797
   155
    HANDLE_ERROR_CASE(OV_ENOTVORBIS);
slouken@797
   156
    HANDLE_ERROR_CASE(OV_EBADHEADER);
slouken@797
   157
    HANDLE_ERROR_CASE(OV_EVERSION);
slouken@797
   158
    HANDLE_ERROR_CASE(OV_ENOTAUDIO);
slouken@797
   159
    HANDLE_ERROR_CASE(OV_EBADPACKET);
slouken@797
   160
    HANDLE_ERROR_CASE(OV_EBADLINK);
slouken@797
   161
    HANDLE_ERROR_CASE(OV_ENOSEEK);
slouken@797
   162
    default:
slouken@797
   163
        Mix_SetError("%s: unknown error %d\n", function, error);
slouken@797
   164
        break;
slouken@797
   165
    }
slouken@797
   166
    return -1;
slouken@797
   167
}
slouken@797
   168
slouken@246
   169
static size_t sdl_read_func(void *ptr, size_t size, size_t nmemb, void *datasource)
slouken@246
   170
{
slouken@246
   171
    return SDL_RWread((SDL_RWops*)datasource, ptr, size, nmemb);
slouken@246
   172
}
slouken@246
   173
slouken@690
   174
static int sdl_seek_func(void *datasource, ogg_int64_t offset, int whence)
slouken@246
   175
{
slouken@690
   176
    return (int)SDL_RWseek((SDL_RWops*)datasource, offset, whence);
slouken@246
   177
}
slouken@246
   178
slouken@690
   179
static long sdl_tell_func(void *datasource)
slouken@246
   180
{
slouken@690
   181
    return (long)SDL_RWtell((SDL_RWops*)datasource);
slouken@246
   182
}
slouken@246
   183
slouken@797
   184
static int OGG_Seek(void *context, double time);
slouken@797
   185
static void OGG_Delete(void *context);
slouken@797
   186
slouken@797
   187
static int OGG_UpdateSection(OGG_music *music)
slouken@797
   188
{
slouken@797
   189
    vorbis_info *vi;
slouken@797
   190
slouken@797
   191
    vi = vorbis.ov_info(&music->vf, -1);
slouken@797
   192
    if (!vi) {
slouken@797
   193
        Mix_SetError("ov_info returned NULL");
slouken@797
   194
        return -1;
slouken@797
   195
    }
slouken@797
   196
slouken@797
   197
    if (vi->channels == music->vi.channels && vi->rate == music->vi.rate) {
slouken@797
   198
        return 0;
slouken@797
   199
    }
slouken@797
   200
    SDL_memcpy(&music->vi, vi, sizeof(*vi));
slouken@797
   201
slouken@797
   202
    if (music->buffer) {
slouken@797
   203
        SDL_free(music->buffer);
slouken@797
   204
        music->buffer = NULL;
slouken@797
   205
    }
slouken@797
   206
slouken@797
   207
    if (music->stream) {
slouken@797
   208
        SDL_FreeAudioStream(music->stream);
slouken@797
   209
        music->stream = NULL;
slouken@797
   210
    }
slouken@797
   211
slouken@797
   212
    music->stream = SDL_NewAudioStream(AUDIO_S16, vi->channels, (int)vi->rate,
slouken@797
   213
                                       music_spec.format, music_spec.channels, music_spec.freq);
slouken@797
   214
    if (!music->stream) {
slouken@797
   215
        return -1;
slouken@797
   216
    }
slouken@797
   217
slouken@797
   218
    music->buffer_size = music_spec.samples * sizeof(Sint16) * vi->channels;
slouken@797
   219
    music->buffer = (char *)SDL_malloc(music->buffer_size);
slouken@797
   220
    if (!music->buffer) {
slouken@797
   221
        return -1;
slouken@797
   222
    }
slouken@797
   223
    return 0;
slouken@797
   224
}
slouken@797
   225
slouken@246
   226
/* Load an OGG stream from an SDL_RWops object */
slouken@777
   227
static void *OGG_CreateFromRW(SDL_RWops *src, int freesrc)
slouken@246
   228
{
slouken@617
   229
    OGG_music *music;
slouken@617
   230
    ov_callbacks callbacks;
slouken@797
   231
    vorbis_comment *vc;
slouken@797
   232
    int isLoopLength = 0, i;
slouken@797
   233
    ogg_int64_t fullLength;
slouken@246
   234
slouken@797
   235
    music = (OGG_music *)SDL_calloc(1, sizeof *music);
slouken@797
   236
    if (!music) {
slouken@797
   237
        SDL_OutOfMemory();
slouken@797
   238
        return NULL;
slouken@797
   239
    }
slouken@797
   240
    music->src = src;
slouken@797
   241
    music->volume = MIX_MAX_VOLUME;
slouken@797
   242
    music->section = -1;
slouken@797
   243
    music->loop = -1;
slouken@797
   244
    music->loop_start = -1;
slouken@797
   245
    music->loop_end = 0;
slouken@797
   246
    music->loop_len = 0;
slouken@797
   247
slouken@797
   248
    SDL_zero(callbacks);
slouken@617
   249
    callbacks.read_func = sdl_read_func;
slouken@617
   250
    callbacks.seek_func = sdl_seek_func;
slouken@617
   251
    callbacks.tell_func = sdl_tell_func;
slouken@246
   252
slouken@797
   253
    if (vorbis.ov_open_callbacks(src, &music->vf, NULL, 0, callbacks) < 0) {
slouken@797
   254
        SDL_SetError("Not an Ogg Vorbis audio stream");
slouken@797
   255
        SDL_free(music);
slouken@797
   256
        return NULL;
slouken@797
   257
    }
v-novichkov@795
   258
slouken@797
   259
    if (OGG_UpdateSection(music) < 0) {
slouken@797
   260
        OGG_Delete(music);
slouken@797
   261
        return NULL;
slouken@797
   262
    }
slouken@246
   263
slouken@797
   264
    vc = vorbis.ov_comment(&music->vf, -1);
slouken@797
   265
    for (i = 0; i < vc->comments; i++) {
slouken@797
   266
        char *param = SDL_strdup(vc->user_comments[i]);
slouken@797
   267
        char *argument = param;
slouken@797
   268
        char *value = SDL_strchr(param, '=');
slouken@797
   269
        if (value == NULL) {
slouken@797
   270
            value = param + SDL_strlen(param);
slouken@797
   271
        } else {
slouken@797
   272
            *(value++) = '\0';
slouken@617
   273
        }
v-novichkov@795
   274
slouken@797
   275
        if (SDL_strcasecmp(argument, "LOOPSTART") == 0)
slouken@797
   276
            music->loop_start = SDL_strtoull(value, NULL, 0);
slouken@797
   277
        else if (SDL_strcasecmp(argument, "LOOPLENGTH") == 0) {
slouken@797
   278
            music->loop_len = SDL_strtoull(value, NULL, 0);
slouken@797
   279
            isLoopLength = 1;
slouken@797
   280
        } else if (SDL_strcasecmp(argument, "LOOPEND") == 0) {
slouken@797
   281
            isLoopLength = 0;
slouken@797
   282
            music->loop_end = SDL_strtoull(value, NULL, 0);
slouken@797
   283
        }
slouken@797
   284
        SDL_free(param);
slouken@797
   285
    }
v-novichkov@795
   286
slouken@797
   287
    if (isLoopLength == 1) {
slouken@797
   288
        music->loop_end = music->loop_start + music->loop_len;
slouken@797
   289
    } else {
slouken@797
   290
        music->loop_len = music->loop_end - music->loop_start;
slouken@797
   291
    }
v-novichkov@795
   292
slouken@797
   293
    fullLength = vorbis.ov_pcm_total(&music->vf, -1);
slouken@797
   294
    if (((music->loop_start >= 0) || (music->loop_end > 0)) &&
slouken@797
   295
        ((music->loop_start < music->loop_end) || (music->loop_end == 0)) &&
slouken@797
   296
         (music->loop_start < fullLength) &&
slouken@797
   297
         (music->loop_end <= fullLength)) {
slouken@797
   298
        if (music->loop_start < 0) music->loop_start = 0;
slouken@797
   299
        if (music->loop_end == 0)  music->loop_end = fullLength;
slouken@797
   300
        music->loop = 1;
slouken@797
   301
    }
v-novichkov@795
   302
slouken@797
   303
    music->freesrc = freesrc;
slouken@777
   304
    return music;
slouken@777
   305
}
slouken@777
   306
slouken@777
   307
/* Set the volume for an OGG stream */
slouken@777
   308
static void OGG_SetVolume(void *context, int volume)
slouken@777
   309
{
slouken@777
   310
    OGG_music *music = (OGG_music *)context;
slouken@777
   311
    music->volume = volume;
slouken@246
   312
}
slouken@246
   313
slouken@63
   314
/* Start playback of a given OGG stream */
slouken@797
   315
static int OGG_Play(void *context, int play_count)
slouken@63
   316
{
slouken@777
   317
    OGG_music *music = (OGG_music *)context;
slouken@797
   318
    music->play_count = play_count;
slouken@797
   319
    return OGG_Seek(music, 0.0);
slouken@63
   320
}
slouken@63
   321
slouken@797
   322
/* Play some of a stream previously started with OGG_play() */
slouken@797
   323
static int OGG_GetSome(void *context, void *data, int bytes, SDL_bool *done)
slouken@63
   324
{
slouken@777
   325
    OGG_music *music = (OGG_music *)context;
slouken@797
   326
    SDL_bool looped = SDL_FALSE;
slouken@797
   327
    int filled, amount, result;
slouken@797
   328
    int section;
slouken@797
   329
    ogg_int64_t pcmPos;
slouken@63
   330
slouken@797
   331
    filled = SDL_AudioStreamGet(music->stream, data, bytes);
slouken@797
   332
    if (filled != 0) {
slouken@797
   333
        return filled;
slouken@797
   334
    }
slouken@63
   335
slouken@797
   336
    if (!music->play_count) {
slouken@797
   337
        /* All done */
slouken@797
   338
        *done = SDL_TRUE;
slouken@797
   339
        return 0;
slouken@797
   340
    }
slouken@797
   341
slouken@797
   342
    section = music->section;
slouken@353
   343
#ifdef OGG_USE_TREMOR
slouken@797
   344
    amount = vorbis.ov_read(&music->vf, music->buffer, music->buffer_size, &section);
slouken@353
   345
#else
slouken@797
   346
    amount = (int)vorbis.ov_read(&music->vf, music->buffer, music->buffer_size, 0, 2, 1, &section);
slouken@353
   347
#endif
slouken@797
   348
    if (amount < 0) {
slouken@797
   349
        set_ov_error("ov_read", amount);
slouken@797
   350
        return -1;
slouken@797
   351
    }
slouken@797
   352
slouken@797
   353
    if (section != music->section) {
slouken@797
   354
        music->section = section;
slouken@797
   355
        if (OGG_UpdateSection(music) < 0) {
slouken@797
   356
            return -1;
slouken@797
   357
        }
slouken@797
   358
    }
v-novichkov@795
   359
v-novichkov@795
   360
    pcmPos = vorbis.ov_pcm_tell(&music->vf);
v-novichkov@795
   361
    if ((music->loop == 1) && (pcmPos >= music->loop_end)) {
slouken@800
   362
        amount -= (int)((pcmPos - music->loop_end) * music->channels) * sizeof(Sint16);
slouken@797
   363
        result = vorbis.ov_pcm_seek(&music->vf, music->loop_start);
slouken@797
   364
        if (result < 0) {
slouken@797
   365
            set_ov_error("ov_pcm_seek", result);
slouken@797
   366
            return -1;
slouken@797
   367
        }
slouken@797
   368
        looped = SDL_TRUE;
v-novichkov@795
   369
    }
v-novichkov@795
   370
slouken@797
   371
    if (amount > 0) {
slouken@797
   372
        if (SDL_AudioStreamPut(music->stream, music->buffer, amount) < 0) {
slouken@797
   373
            return -1;
slouken@617
   374
        }
slouken@797
   375
    } else if (!looped) {
slouken@797
   376
        if (music->play_count == 1) {
slouken@797
   377
            music->play_count = 0;
slouken@797
   378
            SDL_AudioStreamFlush(music->stream);
slouken@797
   379
        } else {
slouken@797
   380
            int play_count = -1;
slouken@797
   381
            if (music->play_count > 0) {
slouken@797
   382
                play_count = (music->play_count - 1);
slouken@797
   383
            }
slouken@797
   384
            if (OGG_Play(music, play_count) < 0) {
slouken@797
   385
                return -1;
slouken@797
   386
            }
slouken@797
   387
        }
slouken@617
   388
    }
slouken@797
   389
    return 0;
slouken@63
   390
}
slouken@777
   391
static int OGG_GetAudio(void *context, void *data, int bytes)
slouken@63
   392
{
slouken@777
   393
    OGG_music *music = (OGG_music *)context;
slouken@797
   394
    return music_pcm_getaudio(context, data, bytes, music->volume, OGG_GetSome);
slouken@63
   395
}
slouken@63
   396
slouken@777
   397
/* Jump (seek) to a given position (time is in seconds) */
slouken@777
   398
static int OGG_Seek(void *context, double time)
slouken@777
   399
{
slouken@777
   400
    OGG_music *music = (OGG_music *)context;
slouken@797
   401
    int result;
slouken@777
   402
#ifdef OGG_USE_TREMOR
slouken@797
   403
    result = vorbis.ov_time_seek(&music->vf, (ogg_int64_t)(time * 1000.0));
slouken@777
   404
#else
slouken@797
   405
    result = vorbis.ov_time_seek(&music->vf, time);
slouken@777
   406
#endif
slouken@797
   407
    if (result < 0) {
slouken@797
   408
        return set_ov_error("ov_time_seek", result);
slouken@797
   409
    }
slouken@777
   410
    return 0;
slouken@777
   411
}
slouken@777
   412
slouken@63
   413
/* Close the given OGG stream */
slouken@777
   414
static void OGG_Delete(void *context)
slouken@63
   415
{
slouken@777
   416
    OGG_music *music = (OGG_music *)context;
slouken@797
   417
    vorbis.ov_clear(&music->vf);
slouken@797
   418
    if (music->stream) {
slouken@797
   419
        SDL_FreeAudioStream(music->stream);
slouken@617
   420
    }
slouken@797
   421
    if (music->buffer) {
slouken@797
   422
        SDL_free(music->buffer);
slouken@797
   423
    }
slouken@797
   424
    if (music->freesrc) {
slouken@797
   425
        SDL_RWclose(music->src);
slouken@797
   426
    }
slouken@797
   427
    SDL_free(music);
slouken@63
   428
}
slouken@63
   429
slouken@777
   430
Mix_MusicInterface Mix_MusicInterface_OGG =
slouken@155
   431
{
slouken@777
   432
    "OGG",
slouken@777
   433
    MIX_MUSIC_OGG,
slouken@777
   434
    MUS_OGG,
slouken@777
   435
    SDL_FALSE,
slouken@777
   436
    SDL_FALSE,
slouken@155
   437
slouken@777
   438
    OGG_Load,
slouken@777
   439
    NULL,   /* Open */
slouken@777
   440
    OGG_CreateFromRW,
slouken@777
   441
    NULL,   /* CreateFromFile */
slouken@777
   442
    OGG_SetVolume,
slouken@777
   443
    OGG_Play,
slouken@797
   444
    NULL,   /* IsPlaying */
slouken@777
   445
    OGG_GetAudio,
slouken@777
   446
    OGG_Seek,
slouken@777
   447
    NULL,   /* Pause */
slouken@777
   448
    NULL,   /* Resume */
slouken@797
   449
    NULL,   /* Stop */
slouken@777
   450
    OGG_Delete,
slouken@777
   451
    NULL,   /* Close */
slouken@777
   452
    OGG_Unload,
slouken@777
   453
};
slouken@777
   454
slouken@777
   455
#endif /* MUSIC_OGG */
slouken@777
   456
slouken@777
   457
/* vi: set ts=4 sw=4 expandtab: */