sdlGetAudioStreamFormat function
bool
sdlGetAudioStreamFormat(
- Pointer<
SdlAudioStream> stream, - Pointer<
SdlAudioSpec> srcSpec, - Pointer<
SdlAudioSpec> dstSpec
Query the current format of an audio stream.
\param stream the SDL_AudioStream to query. \param src_spec where to store the input audio format; ignored if NULL. \param dst_spec where to store the output audio format; ignored if NULL. \returns true on success or false on failure; call SDL_GetError() for more information.
\threadsafety It is safe to call this function from any thread, as it holds a stream-specific mutex while running.
\since This function is available since SDL 3.1.3.
\sa SDL_SetAudioStreamFormat
extern SDL_DECLSPEC bool SDLCALL SDL_GetAudioStreamFormat(SDL_AudioStream *stream, SDL_AudioSpec *src_spec, SDL_AudioSpec *dst_spec)
Implementation
bool sdlGetAudioStreamFormat(Pointer<SdlAudioStream> stream,
Pointer<SdlAudioSpec> srcSpec, Pointer<SdlAudioSpec> dstSpec) {
final sdlGetAudioStreamFormatLookupFunction = libSdl3.lookupFunction<
Uint8 Function(Pointer<SdlAudioStream> stream,
Pointer<SdlAudioSpec> srcSpec, Pointer<SdlAudioSpec> dstSpec),
int Function(
Pointer<SdlAudioStream> stream,
Pointer<SdlAudioSpec> srcSpec,
Pointer<SdlAudioSpec> dstSpec)>('SDL_GetAudioStreamFormat');
return sdlGetAudioStreamFormatLookupFunction(stream, srcSpec, dstSpec) == 1;
}