audio: Added SDL_AudioDeviceStreamPaused.

We had the other two wrapper functions to pause and resume, and forgot query.
This commit is contained in:
Ryan C. Gordon
2025-01-09 01:36:57 -05:00
parent f61860fa93
commit 3f7f632e14
6 changed files with 33 additions and 1 deletions

View File

@@ -1577,6 +1577,25 @@ extern SDL_DECLSPEC bool SDLCALL SDL_PauseAudioStreamDevice(SDL_AudioStream *str
*/
extern SDL_DECLSPEC bool SDLCALL SDL_ResumeAudioStreamDevice(SDL_AudioStream *stream);
/**
* Use this function to query if an audio device associated with a stream is paused.
*
* Unlike in SDL2, audio devices start in an _unpaused_ state, since an app
* has to bind a stream before any audio will flow.
*
* \param stream the audio stream associated with the audio device to query.
* \returns true if device is valid and paused, false otherwise.
*
* \threadsafety It is safe to call this function from any thread.
*
* \since This function is available since SDL 3.1.3.
*
* \sa SDL_PauseAudioStreamDevice
* \sa SDL_ResumeAudioStreamDevice
*/
extern SDL_DECLSPEC bool SDLCALL SDL_AudioStreamDevicePaused(SDL_AudioStream *stream);
/**
* Lock an audio stream for serialized access.
*