sdl3-bindgen-sys
Safe HaskellNone
LanguageGHC2021

SDL3.Sys.Bindgen.AudioShims.FunPtr

Synopsis

Documentation

lithon_SDL_AUDIO_FRAMESIZE :: FunPtr (PtrConst SDL_AudioSpec -> IO CInt) Source #

Calculate the size of each audio frame (in bytes) from an SDL_AudioSpec.

The SDL_AUDIO_FRAMESIZE macro as a function. This reports on the size of an audio sample frame: stereo Sint16 data (2 channels of 2 bytes each) would be 4 bytes per frame, for example.

spec
the SDL_AudioSpec to query.
Returns
the number of bytes used per sample frame.
Thread safety
It is safe to call this function from any thread.
C declaration
lithon_SDL_AUDIO_FRAMESIZE, defined at sdl3-bindgen-sys/SDL_audio_shims.h 38:23

Since: 3.2.0

lithon_SDL_DEFINE_AUDIO_FORMAT :: FunPtr (CBool -> CBool -> CBool -> Uint8 -> IO SDL_AudioFormat) Source #

Define an SDL_AudioFormat value.

The SDL_DEFINE_AUDIO_FORMAT macro as a function. SDL does not support custom audio formats, so this is not of much use externally, but it can be illustrative as to what the various bits of an SDL_AudioFormat mean. For example, SDL_AUDIO_S32LE is signed, littleendian, integer, 32 bits.

is_signed
true for signed data, false for unsigned data.
is_bigendian
true for bigendian data, false for littleendian data.
is_float
true for floating point data, false for integer data.
bits
number of bits per sample.
Returns
a format value in the style of SDL_AudioFormat.
Thread safety
It is safe to call this function from any thread.
C declaration
lithon_SDL_DEFINE_AUDIO_FORMAT, defined at sdl3-bindgen-sys/SDL_audio_shims.h 61:35

Since: 3.2.0