Game Development Community

OpenAL not working on integrated soundcards

by Matthes Bender · in Torque Game Engine · 01/18/2003 (12:27 am) · 24 replies

Unfortunately, I have so far not been able to get the Torque Sound to work on the onboard soundchips of several of our test computers.

The concerned chips are Cirrus Logic Crystal CS4205 or Via686a. I have the OpenAL reference driver installed, the driver appears in the options dialog and can be selected. The driver initializes fine, there's no error and no crash - just nothing coming out of the speakers at all (neither 2D or 3D sounds).

Those chips do support DirectSound3D, other games run fine with sound and I even got the samples that come with Creative's EAX 2.0 Extensions SDK or the OpenAL 1.0 Reference SDK (i.e. XLDemo) to work properly, just not the Torque sound. Using latest stable dev and Win2K.

I don't expect full EAX features on those chips, just having any sound in Torque would be nice. Does anybody have experience with OpenAL on non-SoundBlaster-chips like these? Thanks in advance.
Page «Previous 1 2
#1
01/18/2003 (4:13 am)
Can you email me as much detail as you can about the sound cards (ricko@garagegames.com) and include a link to this thread in the message. Have you had a chance to step through the code and see where OpenAL is failing?

--Rick
#2
01/18/2003 (1:06 pm)
Info is on the way. :) So far I have not noticed any failures while stepping through the code - there's just no sound output. Will do some more stepping through soon.
#3
01/19/2003 (7:58 am)
Got your speakers on?

heh ;) just had to say it.
#4
01/21/2003 (5:24 am)
I did some more stepping through the code and there are no failures there. OpenAL DLL and device init, source and buffer creation and play appear to run just fine. There's just no sound output on the machines mentioned. (Ace: yep, other sound and games run just fine.)
#5
01/21/2003 (7:55 am)
You might try downloading the opensource openal library. Its used by linux torque but I think it also runs on windows. The source code is available so you might be able to dig deeper into what is going on.

www.openal.org/downloads/
#6
01/23/2003 (4:09 pm)
The tests in the sample OpenALDemo.exe from Loki's SDK (link above) all work fine except for the EAX 2.0 test (obviously there is no EAX support on those chips).

When stepping through the code you can see that the initialization falls through from "DirectSound3D" to "DirectSound" because the cards do not offer hardware sound buffers. After that all calls to DirectSound (initialization as well as queueing and playing) succeed.

This happens when stepping through the OpenAl32.dll code from the sample code as well as from Torque code. Only in the sample there is sound and in Torque there isn't, so I wonder just what it is that's different in the engine's way of calling OpenAL.
#7
01/23/2003 (4:38 pm)
@Matthes,

You by chance wouldn't be running on a dual processor PC? Just today I came across a bug with Torque and the latest version of OpenAL running on a dual processor under Windows 2000. The solution was to back-level the OpenAL drivers to the original ones (version 0.9.4.1) released by GarageGames. I can email you the SDK if you would like. The problems I had ranged from no sound, crackling sound when more than four channels where used, dropped sounds, ogg files not playing all the time,...etc.

Rich
#8
01/23/2003 (9:32 pm)
Hi Richard. No, it's all regular PCs. I had tried Loki's OpenAL 0.9.8.8 and Creative's 0.9.8.0

I just now finally got somewhere with my research, though. I noticed that basically all sounds were silenced by the distance being zero in ALu.c Line 218 (pretty much a division by zero there). This was affecting even 2D sounds.

My solution was to change the distance model in the engine to AL_INVERSE_DISTANCE_CLAMPED. Now I was finally able to get some sound on the tested cards. I guess with true DirectSound3D hardware accelerated cards the problem just never occurs.

If you don't mind, Richard, just go ahead and mail me that other SDK version anyway. I spent so much time on this problem by now, can't hurt to have even more testing material next time. Although I hope I'm through with sound debugging for a while. :)
#9
01/23/2003 (9:48 pm)
We should make sure that if that's a useful change, rick or someone (me too) could get it tested out and checked in. Just want to make sure that's an 'okay' default falloff mode to be using.

Also, write creative if there's an actual bug in AL, as the Mac would suffer the same issue.

d
#10
01/24/2003 (2:25 am)
@Matthes,

I sent you the SDK via email. The attachment weighed in at 7 Meg. If you have trouble receiving it, I can throw it up on a sever.

Glad to see that you where able to get it working!

Rich
#11
01/24/2003 (2:45 am)
Matthes: what exactly did you change to "AL_INVERSE_DISTANCE_CLAMPED"?
All the other audio distance vars like "AL_REFERENCE_DISTANCE" etc?
Could you post some details please?
OpenAL seems to be screwed up pretty much, I have various sound problems, esp. with Vehicles - depending on the map geometry and the position of the vehicles, there is sometimes no sound at all... and if I place the same vehicle in another mission, it works, etc.
and sometimes my background music pitches up...
Really weird and really annoying...
and it happens on 3 computers that I have tested (different on-board soundcards ,e.g. VIA AC97 onboard on WIN2000)... :/
And there is only ONE (kinda old) OpenAL driver that *almost* works (besides the above mentioned problems) - if I use the latest drivers it's even worse (no menu music or buttons sounds then, etc. - I've submitted a bug report some time ago with further details...)
#12
01/24/2003 (6:50 am)
David: so far everything appears to be still working fine on the other cards. The change might affect the volume of sounds that are played inside minimum distance or outside maximum distance. The volume will be clamped to the respective limit.

Right now everything sounds good but my perception may currently be impaired by overexcessive sound debugging. ;)

I don't know if it's a real bug in OpenAL. The effect surely was the same with Loki's and Creative's DLL.

Stefan: do a Find in Files for AL_INVERSE_DISTANCE and change that to AL_INVERSE_DISTANCE_CLAMPED. There's only one in the engine. I didn't want to post code snippets because we're in a public forum thread.

On my cards there were no sounds audible at all (including gui sounds), except for some very few effects played excactly at player position. So give it a try and let us know if it helps.
#13
01/24/2003 (12:17 pm)
Thanks, Matthes, but it didn't help in my case... some maps still kill all Vehicle sounds and I don't know why... :(
#14
01/24/2003 (1:50 pm)
@Stefan,

Just going to throw an idea at you based upon the problems that we have seen with the Intel AC'97 and OpenAL.

We don't use any vehicles in our game, but we do have 32 AIPlayers on the screen at once, each with there own wav file. We modified the script example\fps\client\scripts\audioProfiles.cs to split out the different audio types to separate channels. This helped somewhat, but we where still experiencing dropped sounds during the mission from time to time. Back-leveling the OpenAL drivers to version 0.9.4.1 along with the script changes fixed the problem.

Rich
#15
02/02/2003 (9:52 am)
Quote:
OpenAL seems to be screwed up pretty much, I have various sound problems, esp. with Vehicles - depending on the map geometry and the position of the vehicles, there is sometimes no sound at all... and if I place the same vehicle in another mission, it works, etc.
Actually, all the vehicle sounds seem to be there, but they seem to be played at position 0 0 0, which is way below the ground, and their position doesn't change at all with the vehicles...
I really whish somebody would care for all these sound problems people are having with Torque... :((
Should I file another bug report?
Does *anybody* have working vehicle 3D sounds with different vehicles - in every map?
#16
02/03/2003 (7:46 pm)
Quote:Actually, all the vehicle sounds seem to be there, but they seem to be played at position 0 0 0, which is way below the ground, and their position doesn't change at all with the vehicles...
I really whish somebody would care for all these sound problems people are having with Torque... :((
Should I file another bug report?
Does *anybody* have working vehicle 3D sounds with different vehicles - in every map?

I to wish the sounds to be fixed, I get no vehicle sound on any machine I test the vehicle on, no matter what sound card I'm using or OpenAL verison.
#17
02/03/2003 (8:39 pm)
Also having wierd problems with sounds using on board VIA chipset. Sounds in the game play but not GUI button sounds. I'm tracing through the code and I see nothing bad happening. There are no console errors.

I have not stepped into the DLL. One line of code in the engine concerns me, it's:

AUDIOHANDLE handle = alxCreateSource(mProfile->mSoundButtonOver);

handle returned = 1. This is a very strange value for a handle. I'll need to trace into the DLL I guess.

Windows XP Home
AMD Athlon 1.3
1GB RAM
VIA Chipset, latest drivers
OpenAL SDK is installed

I'm scratching my head here. ...

Robert
#18
02/03/2003 (10:11 pm)
Here is my bugreport... I don't think anybody really cares for them, but you could post your errors there, too, if ya want:
www.garagegames.com/projectmanager/issue.php?qis=194
@Robert: a solution for you might be to use the old OpenAL driver I've posted there, I had the exact same problem with GUI sounds, and they ONLY work with that version, no matter which computer I've tried... (they all had integrated soundcards, though...)
At least that works for me now...
#19
02/03/2003 (11:20 pm)
Beffy,

Thanks man. The DLL on your web site fixed my problem. You're great.

Robert
#20
02/27/2003 (8:32 pm)
Fixed mine too. Thought I was going crazy. Thanks
Page «Previous 1 2