[openal] [WIP] AL_EXT_MSADPCM in OpenAL Soft
Chris Robinson
chris.kcat at gmail.com
Wed Mar 5 03:40:12 EST 2014
I've added two extensions to OpenAL Soft in git: AL_SOFT_block_alignment
and AL_SOFT_MSADPCM.
AL_SOFT_block_alignment adds block alignment properties for unpacking
(reading from user) and packing (writing to user) buffer data. The
alignments are specified in sample frames. Samples can only be read or
written in complete blocks. It also, obviously, affects how ADPCM is
decoded and encoded. An alignment of 0 means a default is used...
currently this is 65 for IMA4 (to maintain compatibility with existing
code), 64 for MSADPCM, and 1 for other PCM formats.
AL_SOFT_MSADPCM adds AL_FORMAT_MONO_MSADPCM_SOFT and
AL_FORMAT_STEREO_MSADPCM_SOFT buffer formats, as described here:
http://wiki.multimedia.cx/?title=Microsoft_ADPCM
Pretty self explanatory. It normally uses a block alignment of 64 sample
frames, but this can obviously be changed with the
AL_SOFT_block_alignment extension.
The exact behavior of the extensions isn't yet set in stone, and can be
modified based on any feedback (particularly the default MSADPCM block
alignment, if it really makes any difference). I can also change the
"SOFT" to "EXT" if anyone thinks it would be a good idea to, I just
never feel right about using EXT without some general consensus from
implementors about an extension.
I haven't yet put in any optimizations, such as avoiding the temp buffer
when dealing with signed 16-bit buffer data. But please test it out, let
me know how it works, and feel free to provide feedback. :)
More information about the openal
mailing list