mirror of
https://github.com/libsdl-org/SDL.git
synced 2026-02-07 04:17:14 +00:00
Remove/Rename SDL_FreeWAV() to SDL_free()
This commit is contained in:
@@ -808,7 +808,7 @@ extern DECLSPEC void SDLCALL SDL_PauseAudioDevice(SDL_AudioDeviceID dev,
|
||||
* data in the buffer. The `samples` member is set to a sane default and all
|
||||
* others are set to zero.
|
||||
*
|
||||
* It's necessary to use SDL_FreeWAV() to free the audio data returned in
|
||||
* It's necessary to use SDL_free() to free the audio data returned in
|
||||
* `audio_buf` when it is no longer used.
|
||||
*
|
||||
* Because of the underspecification of the .WAV format, there are many
|
||||
@@ -860,11 +860,11 @@ extern DECLSPEC void SDLCALL SDL_PauseAudioDevice(SDL_AudioDeviceID dev,
|
||||
* more information.
|
||||
*
|
||||
* When the application is done with the data returned in
|
||||
* `audio_buf`, it should call SDL_FreeWAV() to dispose of it.
|
||||
* `audio_buf`, it should call SDL_free() to dispose of it.
|
||||
*
|
||||
* \since This function is available since SDL 3.0.0.
|
||||
*
|
||||
* \sa SDL_FreeWAV
|
||||
* \sa SDL_free
|
||||
* \sa SDL_LoadWAV
|
||||
*/
|
||||
extern DECLSPEC SDL_AudioSpec *SDLCALL SDL_LoadWAV_RW(SDL_RWops * src,
|
||||
@@ -880,23 +880,6 @@ extern DECLSPEC SDL_AudioSpec *SDLCALL SDL_LoadWAV_RW(SDL_RWops * src,
|
||||
#define SDL_LoadWAV(file, spec, audio_buf, audio_len) \
|
||||
SDL_LoadWAV_RW(SDL_RWFromFile(file, "rb"),1, spec,audio_buf,audio_len)
|
||||
|
||||
/**
|
||||
* Free data previously allocated with SDL_LoadWAV() or SDL_LoadWAV_RW().
|
||||
*
|
||||
* After a WAVE file has been opened with SDL_LoadWAV() or SDL_LoadWAV_RW()
|
||||
* its data can eventually be freed with SDL_FreeWAV(). It is safe to call
|
||||
* this function with a NULL pointer.
|
||||
*
|
||||
* \param audio_buf a pointer to the buffer created by SDL_LoadWAV() or
|
||||
* SDL_LoadWAV_RW()
|
||||
*
|
||||
* \since This function is available since SDL 3.0.0.
|
||||
*
|
||||
* \sa SDL_LoadWAV
|
||||
* \sa SDL_LoadWAV_RW
|
||||
*/
|
||||
extern DECLSPEC void SDLCALL SDL_FreeWAV(Uint8 * audio_buf);
|
||||
|
||||
/**
|
||||
* Initialize an SDL_AudioCVT structure for conversion.
|
||||
*
|
||||
|
||||
@@ -39,6 +39,9 @@
|
||||
*/
|
||||
#ifdef SDL_ENABLE_OLD_NAMES
|
||||
|
||||
/* ##SDL_audio.h */
|
||||
#define SDL_FreeWAV SDL_free
|
||||
|
||||
/* ##SDL_keycode.h */
|
||||
#define KMOD_ALT SDL_KMOD_ALT
|
||||
#define KMOD_CAPS SDL_KMOD_CAPS
|
||||
@@ -74,6 +77,9 @@
|
||||
|
||||
#else /* !SDL_ENABLE_OLD_NAMES */
|
||||
|
||||
/* ##SDL_audio.h */
|
||||
#define SDL_FreeWAV SDL_FreeWAV_renamed_SDL_free
|
||||
|
||||
/* ##SDL_keycode.h */
|
||||
#define KMOD_ALT KMOD_ALT_renamed_SDL_KMOD_ALT
|
||||
#define KMOD_CAPS KMOD_CAPS_renamed_SDL_KMOD_CAPS
|
||||
|
||||
Reference in New Issue
Block a user