Skip to content

Latest commit

 

History

History
62 lines (47 loc) · 2 KB

music_cmd.h

File metadata and controls

62 lines (47 loc) · 2 KB
 
Oct 21, 1999
Oct 21, 1999
1
/*
Dec 31, 2011
Dec 31, 2011
2
3
SDL_mixer: An audio mixer library based on the SDL library
Copyright (C) 1997-2012 Sam Lantinga <slouken@libsdl.org>
Oct 21, 1999
Oct 21, 1999
4
Dec 31, 2011
Dec 31, 2011
5
6
7
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
arising from the use of this software.
Oct 21, 1999
Oct 21, 1999
8
Dec 31, 2011
Dec 31, 2011
9
10
11
Permission is granted to anyone to use this software for any purpose,
including commercial applications, and to alter it and redistribute it
freely, subject to the following restrictions:
Oct 21, 1999
Oct 21, 1999
12
Dec 31, 2011
Dec 31, 2011
13
14
15
16
17
18
19
1. The origin of this software must not be misrepresented; you must not
claim that you wrote the original software. If you use this software
in a product, an acknowledgment in the product documentation would be
appreciated but is not required.
2. Altered source versions must be plainly marked as such, and must not be
misrepresented as being the original software.
3. This notice may not be removed or altered from any source distribution.
Oct 21, 1999
Oct 21, 1999
20
21
22
23
*/
/* This file supports an external command for playing music */
Nov 6, 2009
Nov 6, 2009
24
#ifdef CMD_MUSIC
Oct 21, 1999
Oct 21, 1999
25
26
27
28
#include <sys/types.h>
#include <limits.h>
#include <stdio.h>
May 19, 2002
May 19, 2002
29
30
31
#if defined(__linux__) && defined(__arm__)
# include <linux/limits.h>
#endif
Oct 21, 1999
Oct 21, 1999
32
typedef struct {
Jan 21, 2012
Jan 21, 2012
33
34
char *file;
char *cmd;
Oct 21, 1999
Oct 21, 1999
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
pid_t pid;
} MusicCMD;
/* Unimplemented */
extern void MusicCMD_SetVolume(int volume);
/* Load a music stream from the given file */
extern MusicCMD *MusicCMD_LoadSong(const char *cmd, const char *file);
/* Start playback of a given music stream */
extern void MusicCMD_Start(MusicCMD *music);
/* Stop playback of a stream previously started with MusicCMD_Start() */
extern void MusicCMD_Stop(MusicCMD *music);
/* Pause playback of a given music stream */
extern void MusicCMD_Pause(MusicCMD *music);
/* Resume playback of a given music stream */
extern void MusicCMD_Resume(MusicCMD *music);
/* Close the given music stream */
extern void MusicCMD_FreeSong(MusicCMD *music);
/* Return non-zero if a stream is currently playing */
extern int MusicCMD_Active(MusicCMD *music);
Nov 6, 2009
Nov 6, 2009
62
#endif /* CMD_MUSIC */