music_cmd.h
author Sam Lantinga <slouken@lokigames.com>
Thu, 21 Oct 1999 18:02:08 +0000
changeset 0 4ce2db4db959
child 138 4d0dc6b4985d
permissions -rw-r--r--
Initial revision
     1 /*
     2     MIXERLIB:  An audio mixer library based on the SDL library
     3     Copyright (C) 1997-1999  Sam Lantinga
     4 
     5     This library is free software; you can redistribute it and/or
     6     modify it under the terms of the GNU Library General Public
     7     License as published by the Free Software Foundation; either
     8     version 2 of the License, or (at your option) any later version.
     9 
    10     This library is distributed in the hope that it will be useful,
    11     but WITHOUT ANY WARRANTY; without even the implied warranty of
    12     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
    13     Library General Public License for more details.
    14 
    15     You should have received a copy of the GNU Library General Public
    16     License along with this library; if not, write to the Free
    17     Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
    18 
    19     Sam Lantinga
    20     5635-34 Springhouse Dr.
    21     Pleasanton, CA 94588 (USA)
    22     slouken@devolution.com
    23 */
    24 
    25 /* This file supports an external command for playing music */
    26 
    27 #ifdef unix		/* This is a UNIX-specific hack */
    28 
    29 #include <sys/types.h>
    30 #include <limits.h>
    31 #include <stdio.h>
    32 
    33 typedef struct {
    34 	char file[PATH_MAX];
    35 	char cmd[PATH_MAX];
    36 	pid_t pid;
    37 } MusicCMD;
    38 
    39 /* Unimplemented */
    40 extern void MusicCMD_SetVolume(int volume);
    41 
    42 /* Load a music stream from the given file */
    43 extern MusicCMD *MusicCMD_LoadSong(const char *cmd, const char *file);
    44 
    45 /* Start playback of a given music stream */
    46 extern void MusicCMD_Start(MusicCMD *music);
    47 
    48 /* Stop playback of a stream previously started with MusicCMD_Start() */
    49 extern void MusicCMD_Stop(MusicCMD *music);
    50 
    51 /* Pause playback of a given music stream */
    52 extern void MusicCMD_Pause(MusicCMD *music);
    53 
    54 /* Resume playback of a given music stream */
    55 extern void MusicCMD_Resume(MusicCMD *music);
    56 
    57 /* Close the given music stream */
    58 extern void MusicCMD_FreeSong(MusicCMD *music);
    59 
    60 /* Return non-zero if a stream is currently playing */
    61 extern int MusicCMD_Active(MusicCMD *music);
    62 
    63 #endif /* unix */