mirror of
https://github.com/libsdl-org/SDL.git
synced 2026-02-15 08:13:13 +00:00
audio: Make system-specific audio format types part of SDL_AudioFormat.
This keeps them all in the same place, and merges them into the documentation.
This commit is contained in:
@@ -141,19 +141,20 @@ typedef enum SDL_AudioFormat
|
||||
/* SDL_DEFINE_AUDIO_FORMAT(1, 1, 0, 32), */
|
||||
SDL_AUDIO_F32LE = 0x8120u, /**< 32-bit floating point samples */
|
||||
/* SDL_DEFINE_AUDIO_FORMAT(1, 0, 1, 32), */
|
||||
SDL_AUDIO_F32BE = 0x9120u /**< As above, but big-endian byte order */
|
||||
SDL_AUDIO_F32BE = 0x9120u, /**< As above, but big-endian byte order */
|
||||
/* SDL_DEFINE_AUDIO_FORMAT(1, 1, 1, 32), */
|
||||
} SDL_AudioFormat;
|
||||
|
||||
#if SDL_BYTEORDER == SDL_LIL_ENDIAN
|
||||
#define SDL_AUDIO_S16 SDL_AUDIO_S16LE
|
||||
#define SDL_AUDIO_S32 SDL_AUDIO_S32LE
|
||||
#define SDL_AUDIO_F32 SDL_AUDIO_F32LE
|
||||
#else
|
||||
#define SDL_AUDIO_S16 SDL_AUDIO_S16BE
|
||||
#define SDL_AUDIO_S32 SDL_AUDIO_S32BE
|
||||
#define SDL_AUDIO_F32 SDL_AUDIO_F32BE
|
||||
#endif
|
||||
/* These represent the current system's byteorder. */
|
||||
#if SDL_BYTEORDER == SDL_LIL_ENDIAN
|
||||
SDL_AUDIO_S16 = SDL_AUDIO_S16LE,
|
||||
SDL_AUDIO_S32 = SDL_AUDIO_S32LE,
|
||||
SDL_AUDIO_F32 = SDL_AUDIO_F32LE
|
||||
#else
|
||||
SDL_AUDIO_S16 = SDL_AUDIO_S16BE,
|
||||
SDL_AUDIO_S32 = SDL_AUDIO_S32BE,
|
||||
SDL_AUDIO_F32 = SDL_AUDIO_F32BE
|
||||
#endif
|
||||
} SDL_AudioFormat;
|
||||
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user