sdlAudioStreamDevicePaused function audio

bool sdlAudioStreamDevicePaused(
  1. Pointer<SdlAudioStream> 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.2.0.

\sa SDL_PauseAudioStreamDevice \sa SDL_ResumeAudioStreamDevice

extern SDL_DECLSPEC bool SDLCALL SDL_AudioStreamDevicePaused(SDL_AudioStream *stream)

Implementation

bool sdlAudioStreamDevicePaused(Pointer<SdlAudioStream> stream) {
  final sdlAudioStreamDevicePausedLookupFunction = _libSdl
      .lookupFunction<
        Uint8 Function(Pointer<SdlAudioStream> stream),
        int Function(Pointer<SdlAudioStream> stream)
      >('SDL_AudioStreamDevicePaused');
  return sdlAudioStreamDevicePausedLookupFunction(stream) == 1;
}