[Openal-devel] last call: ALC_EXT_disconnect
E. Wing
ewmailing at gmail.com
Wed Aug 26 01:00:11 PDT 2009
>
>> I also wanted to put this idea out there. What do people think of
>> having a callback function you can define (via function pointers) to
>> handle device changes? It seems that constantly polling for a device
>> change is awkward at best. I know OpenAL doesn't have any event
>> callbacks, but maybe looking forward to future revisions, maybe this
>> is desirable.
>
> It's not a very GL-like thing to do, which is sort of a guiding
> principle of OpenAL, for better or worse.
>
> Then again, GL is building a scene on frame at a time and it's not time
> sensitive, so maybe this is worth considering. It's definitely something
> that should go into another extension (even if one of the callbacks
> becomes disconnect notification and amends ALC_EXT_disconnect).
>
So I'm not suggesting any more changes to ALC_EXT_disconnect, but just
wanted to quickly follow up on the idea of callback notifications.
So one thing that strikes me about applying the OpenGL mentality to
OpenAL is that in OpenAL, we constantly violate the cardinal
optimization rule of OpenGL: never use glGet*.
In OpenGL, we go to great lengths to shadow state so we never have to
query the graphics system. In contrast, with OpenAL, shadowing for
certain core things is difficult, imprecise, and sometimes
unreasonable. We tend to query to find when a source stopped playing.
We pretty much have to query to use the buffering queuing system to
clear out processed buffers. And for capture, we have to query to find
out how many samples are currently available. In my mind, we are
already being un-OpenGL like because I have it ingrained in my head
to avoid glGet*. Perhaps it's just me.
Anyway, my 2 cents.
Thanks for listening,
Eric
More information about the Openal-devel
mailing list