From ae44478b30d890fe0fb04022f44d474dcdcc3f9d Mon Sep 17 00:00:00 2001 From: Lassi Pulkkinen Date: Thu, 31 Oct 2024 03:11:21 +0200 Subject: Initial commit (import old repo) --- sdl2/audio.ha | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 sdl2/audio.ha (limited to 'sdl2/audio.ha') diff --git a/sdl2/audio.ha b/sdl2/audio.ha new file mode 100644 index 0000000..1b78880 --- /dev/null +++ b/sdl2/audio.ha @@ -0,0 +1,31 @@ +// Audio format flags. +// +// Current representation (unspecified bits are always zero): +// +// ++-----------------------sample is signed if set +// || +// || ++-----------sample is bigendian if set +// || || +// || || ++---sample is float if set +// || || || +// || || || +---sample bit size---+ +// || || || | | +// 15 14 13 12 11 10 09 08 07 06 05 04 03 02 01 00 +export type SDL_AudioFormat = u16; + +// Unsigned 8-bit samples +export def AUDIO_U8: SDL_AudioFormat = 0x0008; +// Signed 8-bit samples +export def AUDIO_S8: SDL_AudioFormat = 0x8008; +// Unsigned 16-bit samples, little-endian +export def AUDIO_U16LSB: SDL_AudioFormat = 0x0010; +// Signed 16-bit samples, little-endian +export def AUDIO_S16LSB: SDL_AudioFormat = 0x8010; +// Unsigned 16-bit samples, big-endian +export def AUDIO_U16MSB: SDL_AudioFormat = 0x1010; +// Signed 16-bit samples, big-endian +export def AUDIO_S16MSB: SDL_AudioFormat = 0x9010; +// Unsigned 16-bit samples +export def AUDIO_U16: SDL_AudioFormat = AUDIO_U16LSB; +// Signed 16-bit samples +export def AUDIO_S16: SDL_AudioFormat = AUDIO_S16LSB; -- cgit v1.2.3