Skip to content

Latest commit

 

History

History
67 lines (50 loc) · 2.16 KB

music_modplug.h

File metadata and controls

67 lines (50 loc) · 2.16 KB
 
Jun 9, 2013
Jun 9, 2013
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
/*
SDL_mixer: An audio mixer library based on the SDL library
Copyright (C) 1997-2013 Sam Lantinga <slouken@libsdl.org>
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.
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:
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.
*/
Nov 16, 2009
Nov 16, 2009
22
23
#ifdef MODPLUG_MUSIC
Aug 17, 2014
Aug 17, 2014
24
25
26
27
28
#ifdef MODPLUG_HEADER
#include MODPLUG_HEADER
#else
#include <libmodplug/modplug.h>
#endif
Nov 16, 2009
Nov 16, 2009
29
30
31
32
33
#include "SDL_rwops.h"
#include "SDL_audio.h"
#include "SDL_mixer.h"
typedef struct {
May 22, 2013
May 22, 2013
34
35
ModPlugFile *file;
int playing;
Nov 16, 2009
Nov 16, 2009
36
37
38
39
40
41
42
43
44
45
46
} modplug_data;
int modplug_init(SDL_AudioSpec *mixer);
/* Uninitialize the music players */
void modplug_exit(void);
/* Set the volume for a modplug stream */
void modplug_setvolume(modplug_data *music, int volume);
/* Load a modplug stream from an SDL_RWops object */
Dec 31, 2011
Dec 31, 2011
47
modplug_data *modplug_new_RW(SDL_RWops *rw, int freerw);
Nov 16, 2009
Nov 16, 2009
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
/* Start playback of a given modplug stream */
void modplug_play(modplug_data *music);
/* Return non-zero if a stream is currently playing */
int modplug_playing(modplug_data *music);
/* Play some of a stream previously started with modplug_play() */
int modplug_playAudio(modplug_data *music, Uint8 *stream, int len);
/* Stop playback of a stream previously started with modplug_play() */
void modplug_stop(modplug_data *music);
/* Close the given modplug stream */
void modplug_delete(modplug_data *music);
/* Jump (seek) to a given position (time is in seconds) */
void modplug_jump_to_time(modplug_data *music, double time);
Jun 9, 2013
Jun 9, 2013
67
#endif /* MODPLUG_MUSIC */