music_cmd.h
author Sam Lantinga <slouken@libsdl.org>
Sun, 04 Jan 2004 17:41:55 +0000
changeset 241 503416fca921
parent 175 ec13489b36ba
child 294 58eb208474e0
permissions -rw-r--r--
Updated copyright information for 2004 (Happy New Year!)
     1 /*
     2     SDL_mixer:  An audio mixer library based on the SDL library
     3     Copyright (C) 1997-2004 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     slouken@libsdl.org
    21 */
    22 
    23 /* $Id$ */
    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 #if defined(__linux__) && defined(__arm__)
    33 # include <linux/limits.h>
    34 #endif
    35 typedef struct {
    36 	char file[PATH_MAX];
    37 	char cmd[PATH_MAX];
    38 	pid_t pid;
    39 } MusicCMD;
    40 
    41 /* Unimplemented */
    42 extern void MusicCMD_SetVolume(int volume);
    43 
    44 /* Load a music stream from the given file */
    45 extern MusicCMD *MusicCMD_LoadSong(const char *cmd, const char *file);
    46 
    47 /* Start playback of a given music stream */
    48 extern void MusicCMD_Start(MusicCMD *music);
    49 
    50 /* Stop playback of a stream previously started with MusicCMD_Start() */
    51 extern void MusicCMD_Stop(MusicCMD *music);
    52 
    53 /* Pause playback of a given music stream */
    54 extern void MusicCMD_Pause(MusicCMD *music);
    55 
    56 /* Resume playback of a given music stream */
    57 extern void MusicCMD_Resume(MusicCMD *music);
    58 
    59 /* Close the given music stream */
    60 extern void MusicCMD_FreeSong(MusicCMD *music);
    61 
    62 /* Return non-zero if a stream is currently playing */
    63 extern int MusicCMD_Active(MusicCMD *music);
    64 
    65 #endif /* unix */