[Openal-devel] alcSuspendContext()
Richard Furse
rf015d9821 at blueyonder.co.uk
Mon Feb 18 03:52:01 PST 2008
Okay. Batching-up of state changes seems sensible/necessary to me in the
asynchronous scenario, in the same way that transactions provide
consistency in SQL databases. If a source is initially at <0,0,0> and a
listener at <10,0,0>, and the source is moved to <9,0,0> and the
listener to <19,0,0> in one "batch", then I'd expect OpenAL not to
glitch. Without suspension, there's a risk that a block of audio is
rendered half way through the state changes, i.e. with the source at
<9,0,0> and listener at <10,0,0> - which would be bad.
... And it sounds as if Creative are implementing this, so I guess games
probably use it. (?)
Rats. Looks like I'm going to have to implement it after all. ;-)
--Richard
-----Original Message-----
From: openal-devel-bounces at opensource.creative.com
[mailto:openal-devel-bounces at opensource.creative.com] On Behalf Of Garin
Hiebert
Sent: 17 February 2008 02:55
To: openal-devel at opensource.creative.com
Subject: Re: [Openal-devel] alcSuspendContext()
If I remember correctly (and it's possible I don't remember the whole
picture correctly), this call is used in Creative native drivers (Audigy
series, X-Fi), and is a NOP for other implementations. What it's useful
for in the Creative drivers is in batching-up state changes -- you
suspend the context, make all your state changes, then resume the
context. On resuming, the OpenAL library can apply all the changes at
once, which in some cases can save a lot time (in user/kernel context
changes and user-level computation). This is especially noticeable when
applying a zillion EAX/EFX-extension changes -- if you do it on the fly,
it can be much more wasteful than just bundling up the changes and
applying them all at once.
Actually using the call to suspend mixing would always result in
glitching (assuming audio is playing), which seems pretty useless to me
(maybe some implementation did that at one time, but I hope that isn't
currently the case).
Garin
_______________________________________________
Openal-devel mailing list
Openal-devel at opensource.creative.com
http://opensource.creative.com/mailman/listinfo/openal-devel
More information about the Openal-devel
mailing list