@@ -89,6 +89,7 @@ function Mix_Linked_Version: PSDL_Version cdecl; external MIX_LibName {$IFDEF DE
89
89
MIX_INIT_OGG = $00000010 ;
90
90
MIX_INIT_MID = $00000020 ;
91
91
MIX_INIT_OPUS = $00000040 ;
92
+ MIX_INIT_WAVPACK = $00000080 ;
92
93
93
94
{ // Removed in SDL2_mixer 2.0.2
94
95
MIX_INIT_MODPLUG = $00000004;
@@ -161,7 +162,9 @@ TMix_Chunk = record
161
162
MUS_MP3_MAD_UNUSED,
162
163
MUS_FLAC,
163
164
MUS_MODPLUG_UNUSED,
164
- MUS_OPUS
165
+ MUS_OPUS,
166
+ MUS_WAVPACK,
167
+ MUS_GME
165
168
);
166
169
167
170
{ * The internal format for a music chunk interpreted via mikmod *}
@@ -171,6 +174,14 @@ TMix_Chunk = record
171
174
{ * Open the mixer with a certain audio format *}
172
175
function Mix_OpenAudio (frequency: cint; format: cuint16; channels: cint; chunksize: cint): cint cdecl; external MIX_LibName { $IFDEF DELPHI} { $IFDEF MACOS} name ' _MIX_OpenAudio' { $ENDIF} { $ENDIF} ;
173
176
177
+ { * Open a specific audio device for playback. *}
178
+ function Mix_OpenAudioDevice (frequency: cint; format: cuint16; channels: cint; chunksize: cint; device: PAnsiChar; allowed_changes: cint): cint; cdecl;
179
+ external MIX_LibName { $IFDEF DELPHI} { $IFDEF MACOS} name ' _MIX_OpenAudioDevice' { $ENDIF} { $ENDIF} ;
180
+
181
+ { * Pause (1) or resume (0) the whole audio output. *}
182
+ procedure Mix_PauseAudio (pause_on: cint); cdecl;
183
+ external MIX_LibName { $IFDEF DELPHI} { $IFDEF MACOS} name ' _MIX_PauseAudio' { $ENDIF} { $ENDIF} ;
184
+
174
185
{ * Dynamically change the number of channels managed by the mixer.
175
186
If decreasing the number of channels, the upper channels are
176
187
stopped.
@@ -242,6 +253,58 @@ function Mix_HasMusicDecoder(const name: PAnsiChar): TSDL_Bool cdecl;
242
253
*}
243
254
function Mix_GetMusicType (music: PMix_Music): TMix_MusicType cdecl; external MIX_LibName { $IFDEF DELPHI} { $IFDEF MACOS} name ' _MIX_GetMusicType' { $ENDIF} { $ENDIF} ;
244
255
256
+ { * Get the title for a music object, or its filename.
257
+ This returns format-specific metadata. Not all formats support this!
258
+
259
+ If `music` is NULL, this will query the currently-playing music.
260
+
261
+ If the music's title tag is missing or empty, the filename will be returned instead.
262
+
263
+ This function never returns NIL! If no data is available, it will return an empty string.
264
+ *}
265
+ function Mix_GetMusicTitle (music: PMix_Music): PAnsiChar; cdecl;
266
+ external MIX_LibName { $IFDEF DELPHI} { $IFDEF MACOS} name ' _MIX_GetMusicTitle' { $ENDIF} { $ENDIF} ;
267
+
268
+ { * Get the title for a music object.
269
+ This returns format-specific metadata. Not all formats support this!
270
+
271
+ If `music` is NULL, this will query the currently-playing music.
272
+
273
+ This function never returns NIL! If no data is available, it will return an empty string.
274
+ *}
275
+ function Mix_GetMusicTitleTag (music: PMix_Music): PAnsiChar; cdecl;
276
+ external MIX_LibName { $IFDEF DELPHI} { $IFDEF MACOS} name ' _MIX_GetMusicTitleTag' { $ENDIF} { $ENDIF} ;
277
+
278
+ { * Get the artist name for a music object.
279
+ This returns format-specific metadata. Not all formats support this!
280
+
281
+ If `music` is NULL, this will query the currently-playing music.
282
+
283
+ This function never returns NIL! If no data is available, it will return an empty string.
284
+ *}
285
+ function Mix_GetMusicArtistTag (music: PMix_Music): PAnsiChar; cdecl;
286
+ external MIX_LibName { $IFDEF DELPHI} { $IFDEF MACOS} name ' _MIX_GetMusicArtistTag' { $ENDIF} { $ENDIF} ;
287
+
288
+ { * Get the album name for a music object.
289
+ This returns format-specific metadata. Not all formats support this!
290
+
291
+ If `music` is NULL, this will query the currently-playing music.
292
+
293
+ This function never returns NIL! If no data is available, it will return an empty string.
294
+ *}
295
+ function Mix_GetMusicAlbumTag (music: PMix_Music): PAnsiChar; cdecl;
296
+ external MIX_LibName { $IFDEF DELPHI} { $IFDEF MACOS} name ' _MIX_GetMusicAlbumTag' { $ENDIF} { $ENDIF} ;
297
+
298
+ { * Get the copyright text for a music object.
299
+ This returns format-specific metadata. Not all formats support this!
300
+
301
+ If `music` is NULL, this will query the currently-playing music.
302
+
303
+ This function never returns NIL! If no data is available, it will return an empty string.
304
+ *}
305
+ function Mix_GetMusicCopyrightTag (music: PMix_Music): PAnsiChar; cdecl;
306
+ external MIX_LibName { $IFDEF DELPHI} { $IFDEF MACOS} name ' _MIX_GetMusicCopyrightTag' { $ENDIF} { $ENDIF} ;
307
+
245
308
{ * Set a function that is called after all mixing is performed.
246
309
This can be used to provide real-time visual display of the audio stream
247
310
or add a custom mixer filter for the stream data.
@@ -608,6 +671,23 @@ function Mix_Volume(channel: cint; volume: cint): cint cdecl; external MIX_LibNa
608
671
function Mix_VolumeChunk (chunk: PMix_Chunk; volume: cint): cint cdecl; external MIX_LibName { $IFDEF DELPHI} { $IFDEF MACOS} name ' _MIX_VolumeChunk' { $ENDIF} { $ENDIF} ;
609
672
function Mix_VolumeMusic (volume: cint): cint cdecl; external MIX_LibName { $IFDEF DELPHI} { $IFDEF MACOS} name ' _MIX_VolumeMusic' { $ENDIF} { $ENDIF} ;
610
673
674
+ { * Query the current volume for a music object. *}
675
+ function Mix_GetMusicVolume (music: PMix_Music): cint; cdecl;
676
+ external MIX_LibName { $IFDEF DELPHI} { $IFDEF MACOS} name ' _MIX_GetMusicVolume' { $ENDIF} { $ENDIF} ;
677
+
678
+ { * Set the master volume for all channels.
679
+
680
+ SDL_Mixer keeps a per-channel volume, a per-chunk volume, and a master volume.
681
+ All three are considered when mixing audio.
682
+
683
+ Note that the master volume does not affect any playing music;
684
+ it is only applied when mixing chunks. Use Mix_VolumeMusic() for that.
685
+
686
+ If the specified volume is -1, this returns the current volume.
687
+ *}
688
+ function Mix_MasterVolume (volume: cint): cint; cdecl;
689
+ external MIX_LibName { $IFDEF DELPHI} { $IFDEF MACOS} name ' _MIX_MasterVolume' { $ENDIF} { $ENDIF} ;
690
+
611
691
{ * Halt playing of a particular channel *}
612
692
function Mix_HaltChannel (channel: cint): cint cdecl; external MIX_LibName { $IFDEF DELPHI} { $IFDEF MACOS} name ' _MIX_HaltChannel' { $ENDIF} { $ENDIF} ;
613
693
function Mix_HaltGroup (tag: cint): cint cdecl; external MIX_LibName { $IFDEF DELPHI} { $IFDEF MACOS} name ' _MIX_HaltGroup' { $ENDIF} { $ENDIF} ;
@@ -642,6 +722,18 @@ procedure Mix_ResumeMusic cdecl; external MIX_LibName {$IFDEF DELPHI} {$IFDEF MA
642
722
procedure Mix_RewindMusic cdecl; external MIX_LibName { $IFDEF DELPHI} { $IFDEF MACOS} name ' _MIX_RewindMusic' { $ENDIF} { $ENDIF} ;
643
723
function Mix_PausedMusic : cint cdecl; external MIX_LibName { $IFDEF DELPHI} { $IFDEF MACOS} name ' _MIX_PausedMusic' { $ENDIF} { $ENDIF} ;
644
724
725
+ { * Jump to a given order in MOD music. *}
726
+ function Mix_ModMusicJumpToOrder (order: cint): cint; cdecl;
727
+ external MIX_LibName { $IFDEF DELPHI} { $IFDEF MACOS} name ' _MIX_ModMusicJumpToOrder' { $ENDIF} { $ENDIF} ;
728
+
729
+ { * Set a track in a GME music object. *}
730
+ function Mix_StartTrack (music: PMix_Music; track: cint): cint; cdecl;
731
+ external MIX_LibName { $IFDEF DELPHI} { $IFDEF MACOS} name ' _MIX_StartTrack' { $ENDIF} { $ENDIF} ;
732
+
733
+ { * Get number of tracks in a GME music object. *}
734
+ function Mix_GetNumTracks (music: PMix_Music): cint; cdecl;
735
+ external MIX_LibName { $IFDEF DELPHI} { $IFDEF MACOS} name ' _MIX_GetNumTracks' { $ENDIF} { $ENDIF} ;
736
+
645
737
{ * Set the current position in the music stream.
646
738
This returns 0 if successful, or -1 if it failed or isn't implemented.
647
739
This function is only implemented for MOD music formats (set pattern
@@ -650,6 +742,40 @@ function Mix_PausedMusic: cint cdecl; external MIX_LibName {$IFDEF DELPHI} {$IFD
650
742
*}
651
743
function Mix_SetMusicPosition (position: Double): cint cdecl; external MIX_LibName { $IFDEF DELPHI} { $IFDEF MACOS} name ' _MIX_SetMusicPosition' { $ENDIF} { $ENDIF} ;
652
744
745
+ { * Get the current position of a music stream, in seconds.
746
+ Returns -1.0 if this feature is not supported for some codec.
747
+ *}
748
+ function Mix_GetMusicPosition (music: PMix_Music): cdouble; cdecl;
749
+ external MIX_LibName { $IFDEF DELPHI} { $IFDEF MACOS} name ' _MIX_GetMusicPosition' { $ENDIF} { $ENDIF} ;
750
+
751
+ { * Get a music object's duration, in seconds.
752
+ If NIL is passed, returns duration of currently playing music.
753
+ Returns -1.0 on error.
754
+ *}
755
+ function Mix_MusicDuration (music: PMix_Music): cdouble; cdecl;
756
+ external MIX_LibName { $IFDEF DELPHI} { $IFDEF MACOS} name ' _MIX_MusicDuration' { $ENDIF} { $ENDIF} ;
757
+
758
+ { * Get the loop start time position of a music stream, in seconds.
759
+ Returns -1.0 if this feature is not used by this music
760
+ or unsupported by the codec.
761
+ *}
762
+ function Mix_GetMusicLoopStartTime (music: PMix_Music): cdouble; cdecl;
763
+ external MIX_LibName { $IFDEF DELPHI} { $IFDEF MACOS} name ' _MIX_GetMusicLoopStartTime' { $ENDIF} { $ENDIF} ;
764
+
765
+ { * Get the loop end time position of a music stream, in seconds.
766
+ Returns -1.0 if this feature is not used by this music
767
+ or unsupported by the codec.
768
+ *}
769
+ function Mix_GetMusicLoopEndTime (music: PMix_Music): cdouble; cdecl;
770
+ external MIX_LibName { $IFDEF DELPHI} { $IFDEF MACOS} name ' _MIX_GetMusicLoopEndTime' { $ENDIF} { $ENDIF} ;
771
+
772
+ { * Get the loop time length of a music stream, in seconds.
773
+ Returns -1.0 if this feature is not used by this music
774
+ or unsupported by the codec.
775
+ *}
776
+ function Mix_GetMusicLoopLengthTime (music: PMix_Music): cdouble; cdecl;
777
+ external MIX_LibName { $IFDEF DELPHI} { $IFDEF MACOS} name ' _MIX_GetMusicLoopLengthTime' { $ENDIF} { $ENDIF} ;
778
+
653
779
{ * Check the status of a specific channel.
654
780
If the specified channel is -1, check all channels.
655
781
*}
@@ -674,6 +800,21 @@ function Mix_GetSoundFonts: PAnsiChar cdecl; external MIX_LibName {$IFDEF DELPHI
674
800
675
801
function Mix_EachSoundFont (func: TMix_SoundFunc; data: Pointer): cint cdecl; external MIX_LibName { $IFDEF DELPHI} { $IFDEF MACOS} name ' _MIX_EachSoundFont' { $ENDIF} { $ENDIF} ;
676
802
803
+ { * Set full path of the Timidity config file.
804
+ This is only useful if SDL_Mixer is using Timidity to play MIDI files.
805
+ *}
806
+ function Mix_SetTimidityCfg (path: PAnsiChar): cint; cdecl;
807
+ external MIX_LibName { $IFDEF DELPHI} { $IFDEF MACOS} name ' _MIX_SetTimidityCfg' { $ENDIF} { $ENDIF} ;
808
+
809
+ { * Get full path of previously specified Timidity config file.
810
+ If a path has never been specified, this returns NIL.
811
+
812
+ This returns a pointer to internal memory;
813
+ it must not be modified nor freed by the caller.
814
+ *}
815
+ function Mix_GetTimidityCfg (): PAnsiChar; cdecl;
816
+ external MIX_LibName { $IFDEF DELPHI} { $IFDEF MACOS} name ' _MIX_GetTimidityCfg' { $ENDIF} { $ENDIF} ;
817
+
677
818
{ * Get the Mix_Chunk currently associated with a mixer channel
678
819
Returns NULL if it's an invalid channel, or there's no chunk associated.
679
820
*}
0 commit comments