mirror of
https://github.com/libsdl-org/SDL.git
synced 2025-09-29 06:28:29 +00:00
rwops: Renamed SDL_CreateRW and SDL_DestroyRW to SDL_OpenRW and SDL_CloseRW.
This commit is contained in:
@@ -1629,7 +1629,7 @@ static int WaveReadFormat(WaveFile *file)
|
||||
return -1;
|
||||
}
|
||||
} else if (format->encoding == PCM_CODE) {
|
||||
SDL_DestroyRW(fmtsrc);
|
||||
SDL_CloseRW(fmtsrc);
|
||||
return SDL_SetError("Missing wBitsPerSample field in WAVE fmt chunk");
|
||||
}
|
||||
|
||||
@@ -1649,7 +1649,7 @@ static int WaveReadFormat(WaveFile *file)
|
||||
|
||||
/* Extensible header must be at least 22 bytes. */
|
||||
if (fmtlen < 40 || format->extsize < 22) {
|
||||
SDL_DestroyRW(fmtsrc);
|
||||
SDL_CloseRW(fmtsrc);
|
||||
return SDL_SetError("Extensible WAVE header too small");
|
||||
}
|
||||
|
||||
@@ -1661,7 +1661,7 @@ static int WaveReadFormat(WaveFile *file)
|
||||
format->encoding = WaveGetFormatGUIDEncoding(format);
|
||||
}
|
||||
|
||||
SDL_DestroyRW(fmtsrc);
|
||||
SDL_CloseRW(fmtsrc);
|
||||
|
||||
return 0;
|
||||
}
|
||||
@@ -2117,7 +2117,7 @@ int SDL_LoadWAV_RW(SDL_RWops *src, SDL_bool freesrc, SDL_AudioSpec *spec, Uint8
|
||||
SDL_free(file.decoderdata);
|
||||
done:
|
||||
if (freesrc && src) {
|
||||
SDL_DestroyRW(src);
|
||||
SDL_CloseRW(src);
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
Reference in New Issue
Block a user