rwops: Renamed SDL_RWops to SDL_IOStream, and other related symbols.

This commit is contained in:
Ryan C. Gordon
2024-03-14 19:32:50 -04:00
parent fe33b2a81b
commit fc7afa9cbf
36 changed files with 1194 additions and 1132 deletions

View File

@@ -30,7 +30,7 @@ int main(int argc, char **argv)
int bitsize = 0;
int blockalign = 0;
int avgbytes = 0;
SDL_RWops *io = NULL;
SDL_IOStream *io = NULL;
int dst_len;
int ret = 0;
int argpos = 0;
@@ -115,7 +115,7 @@ int main(int argc, char **argv)
}
/* write out a WAV header... */
io = SDL_RWFromFile(file_out, "wb");
io = SDL_IOFromFile(file_out, "wb");
if (!io) {
SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, "opening '%s' failed: %s\n", file_out, SDL_GetError());
ret = 5;
@@ -139,9 +139,9 @@ int main(int argc, char **argv)
SDL_WriteU16LE(io, (Uint16)bitsize); /* significant bits per sample */
SDL_WriteU32LE(io, 0x61746164); /* data */
SDL_WriteU32LE(io, dst_len); /* size */
SDL_WriteRW(io, dst_buf, dst_len);
SDL_WriteIO(io, dst_buf, dst_len);
if (SDL_CloseRW(io) == -1) {
if (SDL_CloseIO(io) == -1) {
SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, "closing '%s' failed: %s\n", file_out, SDL_GetError());
ret = 6;
goto end;