mirror of
https://github.com/libsdl-org/SDL.git
synced 2026-04-28 18:24:22 +00:00
Added SDL prefix AUDIO_* constants
This commit is contained in:
@@ -88,29 +88,29 @@ typedef Uint16 SDL_AudioFormat;
|
||||
* Defaults to LSB byte order.
|
||||
*/
|
||||
/* @{ */
|
||||
#define AUDIO_U8 0x0008 /**< Unsigned 8-bit samples */
|
||||
#define AUDIO_S8 0x8008 /**< Signed 8-bit samples */
|
||||
#define AUDIO_S16LSB 0x8010 /**< Signed 16-bit samples */
|
||||
#define AUDIO_S16MSB 0x9010 /**< As above, but big-endian byte order */
|
||||
#define AUDIO_S16 AUDIO_S16LSB
|
||||
#define SDL_AUDIO_U8 0x0008 /**< Unsigned 8-bit samples */
|
||||
#define SDL_AUDIO_S8 0x8008 /**< Signed 8-bit samples */
|
||||
#define SDL_AUDIO_S16LSB 0x8010 /**< Signed 16-bit samples */
|
||||
#define SDL_AUDIO_S16MSB 0x9010 /**< As above, but big-endian byte order */
|
||||
#define SDL_AUDIO_S16 SDL_AUDIO_S16LSB
|
||||
/* @} */
|
||||
|
||||
/**
|
||||
* \name int32 support
|
||||
*/
|
||||
/* @{ */
|
||||
#define AUDIO_S32LSB 0x8020 /**< 32-bit integer samples */
|
||||
#define AUDIO_S32MSB 0x9020 /**< As above, but big-endian byte order */
|
||||
#define AUDIO_S32 AUDIO_S32LSB
|
||||
#define SDL_AUDIO_S32LSB 0x8020 /**< 32-bit integer samples */
|
||||
#define SDL_AUDIO_S32MSB 0x9020 /**< As above, but big-endian byte order */
|
||||
#define SDL_AUDIO_S32 SDL_AUDIO_S32LSB
|
||||
/* @} */
|
||||
|
||||
/**
|
||||
* \name float32 support
|
||||
*/
|
||||
/* @{ */
|
||||
#define AUDIO_F32LSB 0x8120 /**< 32-bit floating point samples */
|
||||
#define AUDIO_F32MSB 0x9120 /**< As above, but big-endian byte order */
|
||||
#define AUDIO_F32 AUDIO_F32LSB
|
||||
#define SDL_AUDIO_F32LSB 0x8120 /**< 32-bit floating point samples */
|
||||
#define SDL_AUDIO_F32MSB 0x9120 /**< As above, but big-endian byte order */
|
||||
#define SDL_AUDIO_F32 SDL_AUDIO_F32LSB
|
||||
/* @} */
|
||||
|
||||
/**
|
||||
@@ -118,13 +118,13 @@ typedef Uint16 SDL_AudioFormat;
|
||||
*/
|
||||
/* @{ */
|
||||
#if SDL_BYTEORDER == SDL_LIL_ENDIAN
|
||||
#define AUDIO_S16SYS AUDIO_S16LSB
|
||||
#define AUDIO_S32SYS AUDIO_S32LSB
|
||||
#define AUDIO_F32SYS AUDIO_F32LSB
|
||||
#define SDL_AUDIO_S16SYS SDL_AUDIO_S16LSB
|
||||
#define SDL_AUDIO_S32SYS SDL_AUDIO_S32LSB
|
||||
#define SDL_AUDIO_F32SYS SDL_AUDIO_F32LSB
|
||||
#else
|
||||
#define AUDIO_S16SYS AUDIO_S16MSB
|
||||
#define AUDIO_S32SYS AUDIO_S32MSB
|
||||
#define AUDIO_F32SYS AUDIO_F32MSB
|
||||
#define SDL_AUDIO_S16SYS SDL_AUDIO_S16MSB
|
||||
#define SDL_AUDIO_S32SYS SDL_AUDIO_S32MSB
|
||||
#define SDL_AUDIO_F32SYS SDL_AUDIO_F32MSB
|
||||
#endif
|
||||
/* @} */
|
||||
|
||||
@@ -425,7 +425,7 @@ extern DECLSPEC int SDLCALL SDL_GetDefaultAudioInfo(char **name,
|
||||
* When filling in the desired audio spec structure:
|
||||
*
|
||||
* - `desired->freq` should be the frequency in sample-frames-per-second (Hz).
|
||||
* - `desired->format` should be the audio format (`AUDIO_S16SYS`, etc).
|
||||
* - `desired->format` should be the audio format (`SDL_AUDIO_S16SYS`, etc).
|
||||
* - `desired->samples` is the desired size of the audio buffer, in _sample
|
||||
* frames_ (with stereo output, two samples--left and right--would make a
|
||||
* single sample frame). This number should be a power of two, and may be
|
||||
|
||||
@@ -43,6 +43,20 @@
|
||||
#define SDL_atomic_t SDL_AtomicInt
|
||||
|
||||
/* ##SDL_audio.h */
|
||||
#define AUDIO_F32 SDL_AUDIO_F32
|
||||
#define AUDIO_F32LSB SDL_AUDIO_F32LSB
|
||||
#define AUDIO_F32MSB SDL_AUDIO_F32MSB
|
||||
#define AUDIO_F32SYS SDL_AUDIO_F32SYS
|
||||
#define AUDIO_S16 SDL_AUDIO_S16
|
||||
#define AUDIO_S16LSB SDL_AUDIO_S16LSB
|
||||
#define AUDIO_S16MSB SDL_AUDIO_S16MSB
|
||||
#define AUDIO_S16SYS SDL_AUDIO_S16SYS
|
||||
#define AUDIO_S32 SDL_AUDIO_S32
|
||||
#define AUDIO_S32LSB SDL_AUDIO_S32LSB
|
||||
#define AUDIO_S32MSB SDL_AUDIO_S32MSB
|
||||
#define AUDIO_S32SYS SDL_AUDIO_S32SYS
|
||||
#define AUDIO_S8 SDL_AUDIO_S8
|
||||
#define AUDIO_U8 SDL_AUDIO_U8
|
||||
#define SDL_AudioStreamAvailable SDL_GetAudioStreamAvailable
|
||||
#define SDL_AudioStreamClear SDL_ClearAudioStream
|
||||
#define SDL_AudioStreamFlush SDL_FlushAudioStream
|
||||
@@ -457,6 +471,20 @@
|
||||
#elif !defined(SDL_DISABLE_OLD_NAMES)
|
||||
|
||||
/* ##SDL_audio.h */
|
||||
#define AUDIO_F32 AUDIO_F32_renamed_SDL_AUDIO_F32
|
||||
#define AUDIO_F32LSB AUDIO_F32LSB_renamed_SDL_AUDIO_F32LSB
|
||||
#define AUDIO_F32MSB AUDIO_F32MSB_renamed_SDL_AUDIO_F32MSB
|
||||
#define AUDIO_F32SYS AUDIO_F32SYS_renamed_SDL_AUDIO_F32SYS
|
||||
#define AUDIO_S16 AUDIO_S16_renamed_SDL_AUDIO_S16
|
||||
#define AUDIO_S16LSB AUDIO_S16LSB_renamed_SDL_AUDIO_S16LSB
|
||||
#define AUDIO_S16MSB AUDIO_S16MSB_renamed_SDL_AUDIO_S16MSB
|
||||
#define AUDIO_S16SYS AUDIO_S16SYS_renamed_SDL_AUDIO_S16SYS
|
||||
#define AUDIO_S32 AUDIO_S32_renamed_SDL_AUDIO_S32
|
||||
#define AUDIO_S32LSB AUDIO_S32LSB_renamed_SDL_AUDIO_S32LSB
|
||||
#define AUDIO_S32MSB AUDIO_S32MSB_renamed_SDL_AUDIO_S32MSB
|
||||
#define AUDIO_S32SYS AUDIO_S32SYS_renamed_SDL_AUDIO_S32SYS
|
||||
#define AUDIO_S8 AUDIO_S8_renamed_SDL_AUDIO_S8
|
||||
#define AUDIO_U8 AUDIO_U8_renamed_SDL_AUDIO_U8
|
||||
#define SDL_AudioStreamAvailable SDL_AudioStreamAvailable_renamed_SDL_GetAudioStreamAvailable
|
||||
#define SDL_AudioStreamClear SDL_AudioStreamClear_renamed_SDL_ClearAudioStream
|
||||
#define SDL_AudioStreamFlush SDL_AudioStreamFlush_renamed_SDL_FlushAudioStream
|
||||
|
||||
Reference in New Issue
Block a user