/project/jni/sdl_mixer/music_cmd.h

https://github.com/aichunyu/FFPlayer · C Header · 63 lines · 21 code · 12 blank · 30 comment · 1 complexity · 287b1c2d3667767cee89c26d3b21993e MD5 · raw file

  1. /*
  2. SDL_mixer: An audio mixer library based on the SDL library
  3. Copyright (C) 1997-2009 Sam Lantinga
  4. This library is free software; you can redistribute it and/or
  5. modify it under the terms of the GNU Library General Public
  6. License as published by the Free Software Foundation; either
  7. version 2 of the License, or (at your option) any later version.
  8. This library is distributed in the hope that it will be useful,
  9. but WITHOUT ANY WARRANTY; without even the implied warranty of
  10. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  11. Library General Public License for more details.
  12. You should have received a copy of the GNU Library General Public
  13. License along with this library; if not, write to the Free
  14. Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
  15. Sam Lantinga
  16. slouken@libsdl.org
  17. */
  18. /* This file supports an external command for playing music */
  19. #ifdef CMD_MUSIC
  20. #include <sys/types.h>
  21. #include <limits.h>
  22. #include <stdio.h>
  23. #if defined(__linux__) && defined(__arm__)
  24. # include <linux/limits.h>
  25. #endif
  26. typedef struct {
  27. char file[PATH_MAX];
  28. char cmd[PATH_MAX];
  29. pid_t pid;
  30. } MusicCMD;
  31. /* Unimplemented */
  32. extern void MusicCMD_SetVolume(int volume);
  33. /* Load a music stream from the given file */
  34. extern MusicCMD *MusicCMD_LoadSong(const char *cmd, const char *file);
  35. /* Start playback of a given music stream */
  36. extern void MusicCMD_Start(MusicCMD *music);
  37. /* Stop playback of a stream previously started with MusicCMD_Start() */
  38. extern void MusicCMD_Stop(MusicCMD *music);
  39. /* Pause playback of a given music stream */
  40. extern void MusicCMD_Pause(MusicCMD *music);
  41. /* Resume playback of a given music stream */
  42. extern void MusicCMD_Resume(MusicCMD *music);
  43. /* Close the given music stream */
  44. extern void MusicCMD_FreeSong(MusicCMD *music);
  45. /* Return non-zero if a stream is currently playing */
  46. extern int MusicCMD_Active(MusicCMD *music);
  47. #endif /* CMD_MUSIC */