aboutsummaryrefslogtreecommitdiffstats
path: root/OpenAL32/alMidi.c
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2014-03-04 05:16:45 -0800
committerChris Robinson <[email protected]>2014-03-04 05:53:35 -0800
commitf3a87d72b266640a706ddd3234aa4313b53cabce (patch)
treeaf906bac99467fc9407f4d94fbddc678ab3f80a1 /OpenAL32/alMidi.c
parentb0a6b6427cfedc194fceee19ddbb7653fca813df (diff)
Add an extension to alter the block alignment for buffer unpack/pack ops
This is for unpacking (reading, e.g. alBufferData) and packing (writing, e.g. alGetBufferSamplesSOFT) operations. The alignments are specified in sample frames, with 0 meaning the default (65 for IMA4, 1 otherwise). IMA4 alignment must be a multiple of 8, plus 1 (e.g. alignment = n*8 + 1), otherwise an error will occur during (un)packing. Chenging the block alignment does not affect already-loaded sample data, only future unpack/pack operations... so for example, this is perfectly valid: // Load mono IMA4 data with a block alignment of 1024 bytes, or 2041 sample // frames. alBufferi(buffer, AL_UNPACK_BLOCK_ALIGNMENT_SOFT, 2041); alBufferData(buffer, AL_FORMAT_MONO_IMA4, data, data_len, srate); alBufferi(buffer, AL_UNPACK_BLOCK_ALIGNMENT_SOFT, 0);
Diffstat (limited to 'OpenAL32/alMidi.c')
0 files changed, 0 insertions, 0 deletions