[Openal-devel] Faster buffer model, and more random stuff

William Stewart bills at apple.com
Wed Feb 27 18:39:33 PST 2008


On Feb 26, 2008, at 9:08 PM, Sherief N. Farouk wrote:
>
>> I'd think it also helps in cases for mixers that may not want the  
>> data
>> as it's usually stored, and in supporting more formats since it can  
>> be
>> pre-converted on load.
>
> This transformation of sample data at alBufferData time leads to  
> developer
> concerns about memory usage.  e.g. If ADPCM is decoded at alBufferData
> time, the assets get 3.6 times as big.  If the developer is less  
> concerned
> about memory usage and more worried about run-time performance it  
> would be
> better to decode once and play many times.   I guess my point is that,
> alBufferDataStatic gives an alternative option to the developer.
>

I'm wondering about this for a couple of reasons.

Isn't the fact that the developer is using ADPCM as their format  
implicitly saying that they care more about memory usage than CPU  
usage? If so, it would seem to me a reasonable assumption that they  
would only want the data to be decoded when it is to be rendered. If  
not, then they'd be providing PCM buffers I think. So, it seems to me  
that an implementation can reasonably make this assumption and just do  
the decoding at render time (at the granularity of the slice of the  
buffer to be rendered at any particular time).

Following on from that - how much interest is there in providing  
support for this kind of functionality? If we added it to our  
implementation, would many of you use it?

Thanks

Bill



More information about the Openal-devel mailing list