music_cmd.h
changeset 0 4ce2db4db959
child 138 4d0dc6b4985d
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/music_cmd.h	Thu Oct 21 18:02:08 1999 +0000
     1.3 @@ -0,0 +1,63 @@
     1.4 +/*
     1.5 +    MIXERLIB:  An audio mixer library based on the SDL library
     1.6 +    Copyright (C) 1997-1999  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 +    5635-34 Springhouse Dr.
    1.24 +    Pleasanton, CA 94588 (USA)
    1.25 +    slouken@devolution.com
    1.26 +*/
    1.27 +
    1.28 +/* This file supports an external command for playing music */
    1.29 +
    1.30 +#ifdef unix		/* This is a UNIX-specific hack */
    1.31 +
    1.32 +#include <sys/types.h>
    1.33 +#include <limits.h>
    1.34 +#include <stdio.h>
    1.35 +
    1.36 +typedef struct {
    1.37 +	char file[PATH_MAX];
    1.38 +	char cmd[PATH_MAX];
    1.39 +	pid_t pid;
    1.40 +} MusicCMD;
    1.41 +
    1.42 +/* Unimplemented */
    1.43 +extern void MusicCMD_SetVolume(int volume);
    1.44 +
    1.45 +/* Load a music stream from the given file */
    1.46 +extern MusicCMD *MusicCMD_LoadSong(const char *cmd, const char *file);
    1.47 +
    1.48 +/* Start playback of a given music stream */
    1.49 +extern void MusicCMD_Start(MusicCMD *music);
    1.50 +
    1.51 +/* Stop playback of a stream previously started with MusicCMD_Start() */
    1.52 +extern void MusicCMD_Stop(MusicCMD *music);
    1.53 +
    1.54 +/* Pause playback of a given music stream */
    1.55 +extern void MusicCMD_Pause(MusicCMD *music);
    1.56 +
    1.57 +/* Resume playback of a given music stream */
    1.58 +extern void MusicCMD_Resume(MusicCMD *music);
    1.59 +
    1.60 +/* Close the given music stream */
    1.61 +extern void MusicCMD_FreeSong(MusicCMD *music);
    1.62 +
    1.63 +/* Return non-zero if a stream is currently playing */
    1.64 +extern int MusicCMD_Active(MusicCMD *music);
    1.65 +
    1.66 +#endif /* unix */