sdlUnlockAudioStream function audio

bool sdlUnlockAudioStream(
  1. Pointer<SdlAudioStream> stream
)

Unlock an audio stream for serialized access.

This unlocks an audio stream after a call to SDL_LockAudioStream.

\param stream the audio stream to unlock. \returns true on success or false on failure; call SDL_GetError() for more information.

\threadsafety You should only call this from the same thread that previously called SDL_LockAudioStream.

\since This function is available since SDL 3.2.0.

\sa SDL_LockAudioStream

extern SDL_DECLSPEC bool SDLCALL SDL_UnlockAudioStream(SDL_AudioStream *stream)

Implementation

bool sdlUnlockAudioStream(Pointer<SdlAudioStream> stream) {
  final sdlUnlockAudioStreamLookupFunction = _libSdl
      .lookupFunction<
        Uint8 Function(Pointer<SdlAudioStream> stream),
        int Function(Pointer<SdlAudioStream> stream)
      >('SDL_UnlockAudioStream');
  return sdlUnlockAudioStreamLookupFunction(stream) == 1;
}