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