music_modplug.h
author Sam Lantinga <slouken@libsdl.org>
Tue, 21 May 2013 21:21:23 -0700
changeset 617 87116a42526e
parent 542 3de4970b36d4
child 639 f8901a7ff3f1
permissions -rw-r--r--
Cleaned up whitespace for the 2.0.0 release
slouken@481
     1
#ifdef MODPLUG_MUSIC
slouken@481
     2
slouken@481
     3
#include "modplug.h"
slouken@481
     4
#include "SDL_rwops.h"
slouken@481
     5
#include "SDL_audio.h"
slouken@481
     6
#include "SDL_mixer.h"
slouken@481
     7
slouken@481
     8
typedef struct {
slouken@617
     9
    ModPlugFile *file;
slouken@617
    10
    int playing;
slouken@481
    11
} modplug_data;
slouken@481
    12
slouken@481
    13
int modplug_init(SDL_AudioSpec *mixer);
slouken@481
    14
slouken@481
    15
/* Uninitialize the music players */
slouken@481
    16
void modplug_exit(void);
slouken@481
    17
slouken@481
    18
/* Set the volume for a modplug stream */
slouken@481
    19
void modplug_setvolume(modplug_data *music, int volume);
slouken@481
    20
slouken@481
    21
/* Load a modplug stream from an SDL_RWops object */
slouken@521
    22
modplug_data *modplug_new_RW(SDL_RWops *rw, int freerw);
slouken@481
    23
slouken@481
    24
/* Start playback of a given modplug stream */
slouken@481
    25
void modplug_play(modplug_data *music);
slouken@481
    26
slouken@481
    27
/* Return non-zero if a stream is currently playing */
slouken@481
    28
int modplug_playing(modplug_data *music);
slouken@481
    29
slouken@481
    30
/* Play some of a stream previously started with modplug_play() */
slouken@481
    31
int modplug_playAudio(modplug_data *music, Uint8 *stream, int len);
slouken@481
    32
slouken@481
    33
/* Stop playback of a stream previously started with modplug_play() */
slouken@481
    34
void modplug_stop(modplug_data *music);
slouken@481
    35
slouken@481
    36
/* Close the given modplug stream */
slouken@481
    37
void modplug_delete(modplug_data *music);
slouken@481
    38
slouken@481
    39
/* Jump (seek) to a given position (time is in seconds) */
slouken@481
    40
void modplug_jump_to_time(modplug_data *music, double time);
slouken@481
    41
slouken@481
    42
#endif