[Openal] Problems with port to Win XP

Daniel PEACOCK dpeacock at creativelabs.com
Fri Feb 27 06:59:40 PST 2009





Hi,

Do you have up to date versions of wrap_oal.dll (2.1.8.1 or newer) and
openal32.dll (6.14.357.22 or newer) ?

On Windows XP there is an extra OpenAL device available compared to Vista.
It is the "Generic Hardware" device and attempts to render OpenAL audio
using DirectSound3D.    There have been lots of reports about the Realtek
HD Audio DirectSound3D drivers not behaving well (for example claiming
support for features that are not actually implemented).   This can cause
problems for the OpenAL "Generic Hardware" device.   This is particular
relevant when you use features of AL that do not have a direct counterpart
in DS3D ... for example the Linear Distance Model.

So, the first thing I would recommend is trying to use the "Generic
Software" device instead of the "Generic Hardware" device.

For testing purposes this is easily done, by replacing alutInit(0,0) with
...

ALCdevice *pDevice = alcOpenDevice("Generic Software");
ALCcontext *pContext = alcCreateContext(pDevice, NULL);
alcMakeContextCurrent(pContext);

alutInitWithoutContext(0,0);  // otherwise the alutCreateBufferFromFile
calls fail

In a shipping application we highly recommend using the device enumeration
extension to allow the end user to pick the OpenAL device they wish to use.

In the soundmin example you created ... on my machine all I hear is the
"heal.wav" file 3 times in a row (rather than "heal.wav", "ugg.wav",
"heal.wav").  This is because you are not calling alSourceStop before
trying to replace the Buffer on the Source.   You might get away with this
on some devices - but other devices require you to either call alSourceStop
or alGetSourcei(sourceID, AL_SOURCE_STATE, &iState) before swapping Buffers
on the Source.

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.

Creative Labs UK Ltd company number 2658256 registered in England and Wales
at Belmont Road, Belmont Place, Maidenhead, Berkshire, SL6 6TB



                                                                           
             Lastmerlin                                                    
             <wuha at hrz.tu-chem                                             
             nitz.de>                                                   To 
             Sent by:                  openal at opensource.creative.com      
             openal-bounces at op                                          cc 
             ensource.creative                                             
             .com                                                  Subject 
                                       [Openal] Problems with port to Win  
                                       XP                                  
             02/27/2009 12:44                                              
             PM                                                            
                                                                           
                                                                           
                                                                           
                                                                           





Hi all,

I used OpenAL for our game project and it worked really fine. I am using
Linux
(Kubuntu) and Vista and it worked for both. When a teammate tried to run it

on his Win XP a lot of strange errors occured.
His soundcard is: Realtek High Definition Audio

I have made two small example project that show up nearly all the problems.

You can download them here (I was unsure if you like attachments):
http://www-user.tu-chemnitz.de/~wuha/misc/sound.zip

Precisely the problems are:

soundmin:
Minimal Openal example
- when using AL_LINEAR_DISTANCE_CLAMPED there is no sound at all
- when manually creating device and context there is a segfault
- the third sound is sometimes not played (seems random :? )

winsound:
This example is a bit bigger, as I have used the OO wrapper I have written
for
our game. Unfortunately the comments are in german, as all our teammates
are
german. Tell me, if something unclear or you generally refuse to look at it

if it lacks comments, I will translate the comments then. (btw, all
interesting code here is in the sound.cpp file)
- sounds are played significantly less loud than they should be
- some sounds are not played
- suddenly no more sounds are played at all
- one wav file gives AL_NONE when trying to load
The first three occur apparently random and not reproducable :(

One main problem that occurs in our game is not covered by these two: After
a
few minutes (until then sounds are played, but with the same glitches noted

for winsound) the programm crashes with this failed assertion:
(aLSource->TotalBufferDataSize != 0) && "Line 476 of alc.c"
What does this mean and how can we prevent it ?

None of all named errors occurs on other systems. But we have to get it
working on this single machine, too ;)

Thank a lot for any help or suggestions.
--
View this message in context:
http://www.nabble.com/Problems-with-port-to-Win-XP-tp22245194p22245194.html
Sent from the OpenAL - User mailing list archive at Nabble.com.

_______________________________________________
Openal mailing list
Openal at opensource.creative.com
http://opensource.creative.com/mailman/listinfo/openal

ForwardSourceID:NT000698F2



More information about the Openal mailing list