music_modplug.h
author Ryan C. Gordon <icculus@icculus.org>
Tue, 16 Feb 2010 15:30:47 +0000
changeset 485 e2c905c12312
parent 481 286c27f54ea1
child 521 565549e046b0
permissions -rw-r--r--
Win64 fixes (cast to DWORD_PTR instead of DWORD). Patch by Ozkan Sezer.

Fixes Bugzilla #951.
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@481
     9
	ModPlugFile *file;
slouken@481
    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 the given file */
slouken@481
    22
modplug_data *modplug_new(const char *file);
slouken@481
    23
slouken@481
    24
/* Load a modplug stream from an SDL_RWops object */
slouken@481
    25
modplug_data *modplug_new_RW(SDL_RWops *rw);
slouken@481
    26
slouken@481
    27
/* Start playback of a given modplug stream */
slouken@481
    28
void modplug_play(modplug_data *music);
slouken@481
    29
slouken@481
    30
/* Return non-zero if a stream is currently playing */
slouken@481
    31
int modplug_playing(modplug_data *music);
slouken@481
    32
slouken@481
    33
/* Play some of a stream previously started with modplug_play() */
slouken@481
    34
int modplug_playAudio(modplug_data *music, Uint8 *stream, int len);
slouken@481
    35
slouken@481
    36
/* Stop playback of a stream previously started with modplug_play() */
slouken@481
    37
void modplug_stop(modplug_data *music);
slouken@481
    38
slouken@481
    39
/* Close the given modplug stream */
slouken@481
    40
void modplug_delete(modplug_data *music);
slouken@481
    41
slouken@481
    42
/* Jump (seek) to a given position (time is in seconds) */
slouken@481
    43
void modplug_jump_to_time(modplug_data *music, double time);
slouken@481
    44
slouken@481
    45
#endif