table of contents
other versions
- testing 3.2.4+ds-2
- unstable 3.2.4+ds-2
- experimental 3.2.4+git20250228+ds-1
SDL_DEFINE_AUDIO_FORMAT(3) | SDL3 FUNCTIONS | SDL_DEFINE_AUDIO_FORMAT(3) |
NAME¶
SDL_DEFINE_AUDIO_FORMAT - Define an SDL_AudioFormat
value.
HEADER FILE¶
Defined in SDL3/SDL_audio.h
SYNOPSIS¶
#include "SDL3/SDL.h"
#define SDL_DEFINE_AUDIO_FORMAT(signed, bigendian, flt, size) .BI (((Uint16)(signed)<<15)|((Uint16)(bigendian)<<12)|((Uint16)(flt)<<8)|((size)&SDL_AUDIO_MASK_BITSIZE))
DESCRIPTION¶
SDL does not support custom audio formats, so this macro 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
looks like this:
-
SDL_DEFINE_AUDIO_FORMAT(1, 0, 0, 32)
RETURN VALUE¶
Returns a format value in the style of SDL_AudioFormat .
THREAD SAFETY¶
It is safe to call this macro from any thread.
AVAILABILITY¶
This macro is available since SDL 3.2.0.
SDL 3.2.5 | Simple Directmedia Layer |