sjbaker1 at airmail.net
Tue Aug 23 16:40:27 PDT 2005
Олег "__ka" Андреев wrote:
> Excuse me, I'm new to OpenAL (and to English too =)).
> First, is anyone implementing LOKI_buffer_data_callback and is this
> functionality going to be proposed to OpenAL 1.2 (or some other)
> specification. Or, at least, can we be sure, that any modern
> implementation of OpenAL will have this extension.
The problems with data being unpacked by a callback are many:
1) It prevents the data being stored down in the hardware.
2) It forces the implementation to do unpacking, etc in the
user-side driver. You can't run user-code in any kind of
kernel-level device driver.
3) Some popular languages (such as Java) can't implement callbacks.
4) Thread-safety. It's likely that the unpack code would have to
run in a parallel thread (at least on some implementations). This
tends to come to a suprise to naive users resulting in many subtle
and exciting problems!
> Second, some people voice an opinion, that you should be able to read
> data back from buffer. What should be returned, if you didn't pass data
> via alBufferData, but with a callback. Will you return an error? Or will
> you return the last saved chunk?
I would assume that the driver would call the callback to unpack the data
so you'd get unpacked data in your buffer - but there are other possibilities.
---------------------------- Steve Baker -------------------------
HomeEmail: <sjbaker1 at airmail.net> WorkEmail: <sjbaker at link.com>
HomePage : http://www.sjbaker.org
Projects : http://plib.sf.net http://tuxaqfh.sf.net
-----BEGIN GEEK CODE BLOCK-----
GCS d-- s:+ a+ C++++$ UL+++$ P--- L++++$ E--- W+++ N o+ K? w--- !O M-
V-- PS++ PE- Y-- PGP-- t+ 5 X R+++ tv b++ DI++ D G+ e++ h--(-) r+++ y++++
-----END GEEK CODE BLOCK-----
More information about the Openal-devel