lispgames / cl-sdl2-mixer

Bindings for SDL2_mixer
MIT License
12 stars 11 forks source link

Should we add more audio formats? #9

Closed VitoVan closed 2 months ago

VitoVan commented 1 year ago

The current allowed audio formats:

https://github.com/lispgames/cl-sdl2-mixer/blob/fdcc7ee7935dd01fd338e22690451db2cf126156/src/general.lisp#L24-L34

:u8, :s8, :u16lsb, :s16lsb, :u16msb, :s16msb, :u16, :s16, :u16sys, :s16sys

But today SDL_AudioSpec has been updated:

https://wiki.libsdl.org/SDL2/SDL_AudioSpec

With more audio formats supported:

NAME Explain
AUDIO_S8 signed 8-bit samples
AUDIO_U8 unsigned 8-bit samples
AUDIO_S16LSB signed 16-bit samples in little-endian byte order
AUDIO_S16MSB signed 16-bit samples in big-endian byte order
AUDIO_S16SYS signed 16-bit samples in native byte order
AUDIO_S16 AUDIO_S16LSB
AUDIO_U16LSB unsigned 16-bit samples in little-endian byte order
AUDIO_U16MSB unsigned 16-bit samples in big-endian byte order
AUDIO_U16SYS unsigned 16-bit samples in native byte order
AUDIO_U16 AUDIO_U16LSB
AUDIO_S32LSB 32-bit integer samples in little-endian byte order
AUDIO_S32MSB 32-bit integer samples in big-endian byte order
AUDIO_S32SYS 32-bit integer samples in native byte order
AUDIO_S32 AUDIO_S32LSB
AUDIO_F32LSB 32-bit floating point samples in little-endian byte order
AUDIO_F32MSB 32-bit floating point samples in big-endian byte order
AUDIO_F32SYS 32-bit floating point samples in native byte order
AUDIO_F32 AUDIO_F32LSB
fitzsim commented 2 months ago

If this can be done in a way that is backward-compatible with SDL2 versions that do not provide the new audio formats, then yes, please submit a pull request.

fitzsim commented 2 months ago

Oh, you did already, reviewing #10.