| Safe Haskell | None |
|---|---|
| Language | GHC2021 |
SDL3.Sys.Bindgen.AudioShims.Safe
Synopsis
- lithon_SDL_AUDIO_FRAMESIZE :: PtrConst SDL_AudioSpec -> IO CInt
- lithon_SDL_DEFINE_AUDIO_FORMAT :: CBool -> CBool -> CBool -> Uint8 -> IO SDL_AudioFormat
Documentation
lithon_SDL_AUDIO_FRAMESIZE Source #
Arguments
| :: PtrConst SDL_AudioSpec |
|
| -> 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 atsdl3-bindgen-sys/SDL_audio_shims.h 38:23
Since: 3.2.0
lithon_SDL_DEFINE_AUDIO_FORMAT Source #
Arguments
| :: CBool |
|
| -> CBool |
|
| -> CBool |
|
| -> Uint8 |
|
| -> 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 atsdl3-bindgen-sys/SDL_audio_shims.h 61:35
Since: 3.2.0