Re: OpenAL for flight simulator

Chris Robinson <[email protected]>
Newsgroups gmane.comp.lib.openal
Message-ID <[email protected]>
On Thursday, October 14, 2010 5:19:08 am Ben Supnik wrote:
> > I don't know about which hardware supports what, but using EFX, reverb
> > and low-pass filters are available in the software drivers. Outside of
> > Windows, EFX is also available in Linux with a non-ancient version.
> > Under OSX, there's a separate extension set to handle such effects, but
> > I don't know too much about it.
> 
> Right...the problem for someone targeting X-Plane (which runs on three
> platforms) is that there isn't a consistent cross-platform way to do
> effects processing that I know of, e.g. a "standard reverb" and a
> "standard EQ".

FWIW, it should be possible to do a one-time initialization check for EFX, and 
if that fails, look for Apple's extension. Then in the main code, check if EFX 
was detected and set up the filters and effects using that API, else if 
Apple's extensions were detected, set them up using that API.

I'm not sure where to look for details on using Apple's effect API, though. 
However, it should be possible to simply use EFX's effects when available, and 
later on add support for Apple's extensions.

> Chris, if I understood the streaming situation, without extensions it
> would be tough to get down to double buffering, because the app would
> have to poll to see when a buffer is marked as free (to refill and reuse
> it).  With just the base API would double-buffering be reliable at
> reasonably small buffer sizes?

It depends on how small of sizes you're talking about. If you have at least 2 
buffers queued at a given time, that total at least 50ms audio, that should be 
good enough to get by as long as your code can react fast enough to refill 
them. However, if you can queue more audio, you would be better off.

The individual buffer sizes don't matter too much, compared to the total 
length of data in the queue.

> (I looked at the alure API, which looks
> really useful, but I noticed it preps streams but doesn't 'feed' them
> into the sources.)

The version in Git does have methods to feed streams into sources, and manage 
the buffers for you. You can see here for how streaming can work in the latest 
Git version:
http://repo.or.cz/w/alure.git/blob/HEAD:/examples/alurestream.c
It is, of course, subject to change until a proper release is made, but I 
don't see it changing all that much.
_______________________________________________
Openal mailing list
[email protected]
http://opensource.creative.com/mailman/listinfo/openal
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.