sdlAudioStreamAvailable function

int sdlAudioStreamAvailable(
  1. Pointer<SdlAudioStream> stream
)

Get the number of converted/resampled bytes available.

The stream may be buffering data behind the scenes until it has enough to resample correctly, so this number might be lower than what you expect, or even be zero. Add more data or flush the stream if you need the data now.

\since This function is available since SDL 2.0.7.

\sa SDL_NewAudioStream \sa SDL_AudioStreamPut \sa SDL_AudioStreamGet \sa SDL_AudioStreamFlush \sa SDL_AudioStreamClear \sa SDL_FreeAudioStream

extern DECLSPEC int SDLCALL SDL_AudioStreamAvailable(SDL_AudioStream *stream)

Implementation

int sdlAudioStreamAvailable(Pointer<SdlAudioStream> stream) {
  final sdlAudioStreamAvailableLookupFunction = libSdl2.lookupFunction<
      Int32 Function(Pointer<SdlAudioStream> stream),
      int Function(Pointer<SdlAudioStream> stream)>('SDL_AudioStreamAvailable');
  return sdlAudioStreamAvailableLookupFunction(stream);
}