sdl3-bindgen-sys
Safe HaskellNone
LanguageGHC2021

SDL3.Sys.Bindgen.AudioShims.Safe

Synopsis

Documentation

lithon_SDL_AUDIO_FRAMESIZE Source #

Arguments

:: PtrConst SDL_AudioSpec
spec
the SDL_AudioSpec to query.
-> IO CInt 

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.

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 Source #

Arguments

:: CBool
is_signed
true for signed data, false for unsigned data.
-> CBool
is_bigendian
true for bigendian data, false for littleendian data.
-> CBool
is_float
true for floating point data, false for integer data.
-> Uint8
bits
number of bits per sample.
-> IO SDL_AudioFormat 

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.

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