[Openal] Lag playing sounds over the "Generic Software" device
Daniel PEACOCK
dpeacock at creativelabs.com
Fri Sep 5 02:18:02 PDT 2008
Hi Sergio,
A native X-Fi device will certainly give the best (lowest) latency when
starting to play a sound (and updating parameters). The "Generic
Software" device will have additional latency (all software mixers will).
The amount of latency will depend on the soundcard (and how accurate the
DirectSound play and write cursors are updated) plus the fact that updates
are done in a timer callback that is called every 25ms (40Hz).
So, starting to play a sound will have a random amount of latency between 0
and 25ms (depending upon when the 'play' call arrives compared to the 25ms
timer) plus a small amount of latency used to write ahead of the
DirectSound write cursor (about 15ms) plus what ever latency is introduced
by the soundcard - i.e. time taken to hear what is written in front of the
write cursor.
250ms is higher than expected though. What soundcard do you have?
A few games have chosen to provide an OpenAL output path in addition to
their own software mixer. This can happen when the game already has their
own solution but wants to give users with high-end soundcards a better
sound experience (e.g high quality 3D audio and EAX effects). Other games
have used OpenAL everywhere.
Dan
Creative Labs (UK) Ltd.
Notice
The information in this message is confidential and may be legally
privileged. It is intended solely for the addressee. Access to this
message by anyone else is unauthorized. If you are not the intended
recipient, any disclosure, copying or distribution of the message, or
any action taken by you in reliance on it, is prohibited and may be
unlawful. If you have received this message in error, please delete it
and contact the sender immediately. Thank you.
"Sergio
Rodriguez"
<sergiorg at gmail.c To
om> openal at opensource.creative.com
Sent by: cc
openal-bounces at op
ensource.creative Subject
.com [Openal] Lag playing sounds over
the "Generic Software" device
09/05/2008 07:46
AM
Hi,
I've been using OpenAL for a while in and I've found a different behaviour
between accelerated HW devices and the Generic Software implementation (on
top of DirectSound, I suppose).
The problem is that when using with an X-Fi, the sound plays without no
lag: when you call AL_PLAY over a source the sound starts playing
inmediately. But in the same machine, initializing the OpenAL library in
software mode (opening the "Generic Software" device enumerated by the
library) the sounds starts playing with a noticeable lag (I can't measure
it, but I think that about 1/4 second or so).
I have no EAX effect active and the only difference between the two
executions of the program is the opened device: "Default device" -over an
X-Fi- and Generic Software -over the same card-). Is this normal? Could it
be fixed with some code?
BTW, I'm asking myself... for the AAA games that use OpenAL, do you think
they use the library for every soundcard, or these games implement two
audio paths: one over OpenAL for HW accelerated devices (like Audigy and
X-Fi) and other path for SW devices implemented directly over DirectSound
or other audio software library? For example, in Doom3 and Quake IV (if I
remember correctly) the checkbox for activating the OpenAL renderer is
disabled if you don't have an Audigy or X-Fi.
Any help is welcome._______________________________________________
Openal mailing list
Openal at opensource.creative.com
http://opensource.creative.com/mailman/listinfo/openal
ForwardSourceID:NT00064A32
More information about the Openal
mailing list