[Openal] When to stream?
Adam D. Moss
adam at gimp.org
Wed Jun 29 02:19:10 PDT 2005
Garin Hiebert wrote:
>> Is there any great reason for this, short of bugs? I do see
>> the SI AL silently eat the shorter buffers I send it, randomly.
> It would be a bug, since the spec doesn't specify that you can't send
> things in in very small chunks.
> On the other hand, I don't think
> anyone really expects to be able to stream back 10,000 2-byte buffers
> in a queue -- it would be just plain weird to ask an OpenAL
> implementation to do that...
Weird doesn't mean wrong. :) For example, albeit not queued, a 2-byte
buffer on a looped source is the obvious, naive way to implement a
square-wave voice for a music synthesiser, for example.
> I plan to add a test to the 1.1 suite that will test behavior down to
> some fairly small limit -- maybe 1024 bytes.
If it's helpful data, the shortest 'real world usage' sample I
use is a 'click' sound at 1212 bytes. The normal size of a
buffer I use is 4096 bytes (I cache audio in chunks of this size).
At the end of a sound, of course, the last buffer in the queue might
be as small as 2 bytes quite naturally.
Adam D. Moss - adam at gimp.org
More information about the Openal