mirror of
https://github.com/libsdl-org/SDL.git
synced 2026-06-02 15:47:31 +08: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:
+12
-11
@@ -141,19 +141,20 @@ typedef enum SDL_AudioFormat
|
|||||||
/* SDL_DEFINE_AUDIO_FORMAT(1, 1, 0, 32), */
|
/* SDL_DEFINE_AUDIO_FORMAT(1, 1, 0, 32), */
|
||||||
SDL_AUDIO_F32LE = 0x8120u, /**< 32-bit floating point samples */
|
SDL_AUDIO_F32LE = 0x8120u, /**< 32-bit floating point samples */
|
||||||
/* SDL_DEFINE_AUDIO_FORMAT(1, 0, 1, 32), */
|
/* 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_DEFINE_AUDIO_FORMAT(1, 1, 1, 32), */
|
||||||
} SDL_AudioFormat;
|
|
||||||
|
|
||||||
#if SDL_BYTEORDER == SDL_LIL_ENDIAN
|
/* These represent the current system's byteorder. */
|
||||||
#define SDL_AUDIO_S16 SDL_AUDIO_S16LE
|
#if SDL_BYTEORDER == SDL_LIL_ENDIAN
|
||||||
#define SDL_AUDIO_S32 SDL_AUDIO_S32LE
|
SDL_AUDIO_S16 = SDL_AUDIO_S16LE,
|
||||||
#define SDL_AUDIO_F32 SDL_AUDIO_F32LE
|
SDL_AUDIO_S32 = SDL_AUDIO_S32LE,
|
||||||
#else
|
SDL_AUDIO_F32 = SDL_AUDIO_F32LE
|
||||||
#define SDL_AUDIO_S16 SDL_AUDIO_S16BE
|
#else
|
||||||
#define SDL_AUDIO_S32 SDL_AUDIO_S32BE
|
SDL_AUDIO_S16 = SDL_AUDIO_S16BE,
|
||||||
#define SDL_AUDIO_F32 SDL_AUDIO_F32BE
|
SDL_AUDIO_S32 = SDL_AUDIO_S32BE,
|
||||||
#endif
|
SDL_AUDIO_F32 = SDL_AUDIO_F32BE
|
||||||
|
#endif
|
||||||
|
} SDL_AudioFormat;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
Reference in New Issue
Block a user