sdlUnlockAudioStream function

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.1.3.

\sa SDL_LockAudioStream

extern SDL_DECLSPEC bool SDLCALL SDL_UnlockAudioStream(SDL_AudioStream *stream)

Implementation

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