0d944b69a13eb5e332ff9a2bd8fda20d735f08c8
1 {$INCLUDE ../shared/a_modes.inc}
10 MIX_INIT_FLAC
= $00000001;
11 MIX_INIT_MOD
= $00000002;
12 MIX_INIT_MODPLUG
= $00000004;
13 MIX_INIT_MP3
= $00000008;
14 MIX_INIT_OGG
= $00000010;
15 MIX_INIT_FLUIDSYNTH
= $00000020;
17 MIX_DEFAULT_FREQUENCY
= 22050;
18 MIX_DEFAULT_CHANNELS
= 2;
22 {$IF DEFINED(ENDIAN_LITTLE)}
23 MIX_DEFAULT_FORMAT
= AUDIO_S16LSB
;
24 {$ELSEIF DEFINED(ENDIAN_BIG)}
25 MIX_DEFAULT_FORMAT
= AUDIO_S16MSB
;
27 {$FATAL Unable to determine endianness.}
32 PMix_Chunk
= ^TMix_Chunk
;
40 PMix_Music
= ^TMix_Music
;
41 TMix_Music
= record end;
43 TMix_Fading
= (MIX_NO_FADING
, MIX_FADING_OUT
, MIX_FADING_IN
);
45 TMix_MusicType
= (MUS_NONE
,
56 TMix_Channel_Finished
= procedure(channel
: Integer); cdecl;
60 function Mix_GetMusicType(music
: TMix_Music
): TMix_MusicType
;
61 function Mix_Init(flags
: Integer): Integer;
62 function Mix_OpenAudio(frequency
: Integer; format
: UInt16
; channels
: Integer; chunksize
: Integer): Integer;
63 function Mix_GetError
: PAnsiChar;
64 function Mix_QuerySpec(frequency
: PInt
; format
: PUInt16
; channels
: PInt
): Integer;
65 function Mix_GetNumChunkDecoders
: Integer;
66 function Mix_GetChunkDecoder(index
: Integer): PAnsiChar;
67 function Mix_GetNumMusicDecoders
: Integer;
68 function Mix_GetMusicDecoder(index
: Integer): PAnsiChar;
69 function Mix_AllocateChannels(numchans
: Integer): Integer;
70 procedure Mix_ChannelFinished(channel_finished
: TMix_Channel_Finished
);
71 function Mix_LoadMUS(_file
: PAnsiChar): PMix_Music
;
72 function Mix_LoadMUS_RW(src
: PSDL_RWops
; freesrc
: Integer): PMix_Music
;
73 function Mix_LoadWAV(_file
: PAnsiChar): PMix_Chunk
;
74 function Mix_LoadWAV_RW(src
: PSDL_RWops
; freesrc
: Integer): PMix_Chunk
;
76 function Mix_PlayChannel(channel
: Integer; chunk
: PMix_Chunk
; loops
: Integer): Integer;
77 function Mix_Volume(channel
: Integer; volume
: Integer): Integer;
78 function Mix_HaltMusic
: Integer;
79 function Mix_PlayMusic(music
: PMix_Music
; loops
: Integer): Integer;
80 function Mix_SetPanning(channel
: Integer; left
: UInt8
; right
: UInt8
): Integer;
81 procedure Mix_FreeChunk(chunk
: PMix_Chunk
);
82 procedure Mix_FreeMusic(music
: PMix_Music
);
84 function Mix_VolumeMusic(volume
: Integer): Integer;
85 function Mix_HaltChannel(channel
: Integer): Integer;
86 procedure Mix_CloseAudio
;
87 function Mix_PlayingMusic
: Integer;
88 function Mix_Paused(channel
: Integer): Integer;
89 procedure Mix_Pause(channel
: Integer);
90 procedure Mix_Resume(channel
: Integer);
92 procedure Mix_PauseMusic
;
93 function Mix_PausedMusic
: Integer;
94 procedure Mix_ResumeMusic
;
98 function Mix_GetMusicType(music
: TMix_Music
): TMix_MusicType
;
100 result
:= TMix_MusicType
.MUS_NONE
103 function Mix_Init(flags
: Integer): Integer;
108 function Mix_OpenAudio(frequency
: Integer; format
: UInt16
; channels
: Integer; chunksize
: Integer): Integer;
113 function Mix_GetError
: PAnsiChar;
118 function Mix_QuerySpec(frequency
: PInt
; format
: PUInt16
; channels
: PInt
): Integer;
123 function Mix_GetNumChunkDecoders
: Integer;
128 function Mix_GetChunkDecoder(index
: Integer): PAnsiChar;
133 function Mix_GetNumMusicDecoders
: Integer;
138 function Mix_GetMusicDecoder(index
: Integer): PAnsiChar;
143 function Mix_AllocateChannels(numchans
: Integer): Integer;
148 procedure Mix_ChannelFinished(channel_finished
: TMix_Channel_Finished
);
152 function Mix_LoadMUS(_file
: PAnsiChar): PMix_Music
;
157 function Mix_LoadMUS_RW(src
: PSDL_RWops
; freesrc
: Integer): PMix_Music
;
162 function Mix_LoadWAV(_file
: PAnsiChar): PMix_Chunk
;
164 Result
:= Mix_LoadWAV_RW(SDL_RWFromFile(_file
, 'rb'), 1);
167 function Mix_LoadWAV_RW(src
: PSDL_RWops
; freesrc
: Integer): PMix_Chunk
;
172 function Mix_PlayChannel(channel
: Integer; chunk
: PMix_Chunk
; loops
: Integer): Integer;
177 function Mix_Volume(channel
: Integer; volume
: Integer): Integer;
182 function Mix_HaltMusic
: Integer;
187 function Mix_PlayMusic(music
: PMix_Music
; loops
: Integer): Integer;
192 function Mix_SetPanning(channel
: Integer; left
: UInt8
; right
: UInt8
): Integer;
197 procedure Mix_FreeChunk(chunk
: PMix_Chunk
);
201 procedure Mix_FreeMusic(music
: PMix_Music
);
205 function Mix_VolumeMusic(volume
: Integer): Integer;
210 function Mix_HaltChannel(channel
: Integer): Integer;
215 procedure Mix_CloseAudio
;
219 function Mix_PlayingMusic
: Integer;
224 function Mix_Paused(channel
: Integer): Integer;
229 procedure Mix_Pause(channel
: Integer);
233 procedure Mix_Resume(channel
: Integer);
237 procedure Mix_PauseMusic
;
241 function Mix_PausedMusic
: Integer;
246 procedure Mix_ResumeMusic
;