music_mod.h
changeset 411 cade1e3a4cb8
child 419 e27fe0bfe470
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/music_mod.h	Sat Oct 03 08:09:27 2009 +0000
     1.3 @@ -0,0 +1,72 @@
     1.4 +/*
     1.5 +    SDL_mixer:  An audio mixer library based on the SDL library
     1.6 +    Copyright (C) 1997-2009 Sam Lantinga
     1.7 +
     1.8 +    This library is free software; you can redistribute it and/or
     1.9 +    modify it under the terms of the GNU Library General Public
    1.10 +    License as published by the Free Software Foundation; either
    1.11 +    version 2 of the License, or (at your option) any later version.
    1.12 +
    1.13 +    This library is distributed in the hope that it will be useful,
    1.14 +    but WITHOUT ANY WARRANTY; without even the implied warranty of
    1.15 +    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
    1.16 +    Library General Public License for more details.
    1.17 +
    1.18 +    You should have received a copy of the GNU Library General Public
    1.19 +    License along with this library; if not, write to the Free
    1.20 +    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
    1.21 +
    1.22 +    Sam Lantinga
    1.23 +    slouken@libsdl.org
    1.24 +*/
    1.25 +
    1.26 +/* $Id: music_mod.h 4211 2008-12-08 00:27:32Z slouken $ */
    1.27 +
    1.28 +#ifdef MOD_MUSIC
    1.29 +
    1.30 +/* This file supports MOD tracker music streams */
    1.31 +
    1.32 +struct MODULE;
    1.33 +
    1.34 +/* Initialize the Ogg Vorbis player, with the given mixer settings
    1.35 +   This function returns 0, or -1 if there was an error.
    1.36 + */
    1.37 +extern int MOD_init(SDL_AudioSpec *mixer);
    1.38 +
    1.39 +/* Uninitialize the music players */
    1.40 +extern void MOD_exit(void);
    1.41 +
    1.42 +/* Set the volume for a MOD stream */
    1.43 +extern void MOD_setvolume(struct MODULE *music, int volume);
    1.44 +
    1.45 +/* Load a MOD stream from the given file */
    1.46 +extern struct MODULE *MOD_new(const char *file);
    1.47 +
    1.48 +/* Load a MOD stream from an SDL_RWops object */
    1.49 +extern struct MODULE *MOD_new_RW(SDL_RWops *rw);
    1.50 +
    1.51 +/* Start playback of a given MOD stream */
    1.52 +extern void MOD_play(struct MODULE *music);
    1.53 +
    1.54 +/* Return non-zero if a stream is currently playing */
    1.55 +extern int MOD_playing(struct MODULE *music);
    1.56 +
    1.57 +/* Play some of a stream previously started with MOD_play() */
    1.58 +extern int MOD_playAudio(struct MODULE *music, Uint8 *stream, int len);
    1.59 +
    1.60 +/* Stop playback of a stream previously started with MOD_play() */
    1.61 +extern void MOD_stop(struct MODULE *music);
    1.62 +
    1.63 +/* Close the given MOD stream */
    1.64 +extern void MOD_delete(struct MODULE *music);
    1.65 +
    1.66 +/* Jump (seek) to a given position (time is in seconds) */
    1.67 +extern void MOD_jump_to_time(struct MODULE *music, double time);
    1.68 +
    1.69 +/* Set the MOD synchronization value */
    1.70 +extern int MOD_SetSynchroValue(int i);
    1.71 +
    1.72 +/* Get the MOD synchronization value */
    1.73 +extern int MOD_GetSynchroValue(void);
    1.74 +
    1.75 +#endif /* MOD_MUSIC */