Add error returns to void functions that can fail/set errors.

This takes care of the last set of void functions that could
potentially be shifted to instead return an int indicating success and
setting an error in case of an error.
This commit is contained in:
Linus Probert
2023-02-08 20:43:52 +01:00
committed by Sam Lantinga
parent b305d9e3c0
commit 3bd737d44c
13 changed files with 53 additions and 27 deletions

View File

@@ -801,6 +801,10 @@ extern DECLSPEC int SDLCALL SDL_FlushAudioStream(SDL_AudioStream *stream);
/**
* Clear any pending data in the stream without converting it
*
* \param stream The audio stream to clear
* \returns 0 on success or a negative error code on failure; call
* SDL_GetError() for more information.
*
* \since This function is available since SDL 3.0.0.
*
* \sa SDL_CreateAudioStream
@@ -810,7 +814,7 @@ extern DECLSPEC int SDLCALL SDL_FlushAudioStream(SDL_AudioStream *stream);
* \sa SDL_FlushAudioStream
* \sa SDL_DestroyAudioStream
*/
extern DECLSPEC void SDLCALL SDL_ClearAudioStream(SDL_AudioStream *stream);
extern DECLSPEC int SDLCALL SDL_ClearAudioStream(SDL_AudioStream *stream);
/**
* Free an audio stream