audio: Made SDL_LoadWAV a real function, not just a macro.

This commit is contained in:
Ryan C. Gordon
2023-05-30 01:08:56 -04:00
parent 26525f5fd3
commit 3d65a2cefe
4 changed files with 57 additions and 18 deletions

View File

@@ -2110,3 +2110,9 @@ int SDL_LoadWAV_RW(SDL_RWops *src, int freesrc, SDL_AudioSpec *spec, Uint8 **aud
return result;
}
int SDL_LoadWAV(const char *path, SDL_AudioSpec *spec, Uint8 **audio_buf, Uint32 *audio_len)
{
return SDL_LoadWAV_RW(SDL_RWFromFile(path, "rb"), 1, spec, audio_buf, audio_len);
}