[Openal] Counting samples
chris.kcat at gmail.com
Wed Feb 6 07:00:12 PST 2008
On Wednesday 06 February 2008 03:09:32 am Niklas Frykholm wrote:
> The documentation is a bit unclear on how AL_BYTE_OFFSET and AL_SIZE
> behaves with compressed buffers. AL_BYTE_OFFSET says that it "may
> represent an approximate offset within the compressed data buffer" while
> AL_SIZE doesn't say anything about compression.
Someone from Creative may have to respond to clear things up, but here's my
thoughts on it. AL_BYTE_OFFSET and AL_SIZE should both returned compressed
positions *if* the data is stored compressed.. such that you should be able
to set AL_BYTE_OFFSET to AL_SIZE / 2 and always get reasonably close to the
center of the buffer, regardless of compression used (owing to block sizes
for compressed formats).
The behavior you noted is what the Windows drivers (and OpenAL Soft by being
based on the old Windows code) do. But personally, I'd like to be able to get
rid of the AL_BYTE_OFFSET fixups that emulate where it'd be in the original
compressed data stream from the internal uncompressed stream.
More information about the Openal