Game Development Community

dev|Pro Game Development Curriculum

Sound Upgrade

by Marcelo Oliveira · 12/14/2004 (11:08 pm) · 57 comments

Download Code File

Install instructions:

- Download the attached zip;
- Delete all files in the engine\audio directory;
- Decompress (or copy) all zip stuff into your torque directory, overwrite when asked;
- Apply the patch (created by using the HEAD version);
- Add lib\vorbis\win32\ogg_static.lib and lib\vorbis\win32\vorbisfile_static.lib to your project linker;
- Remove ambientAudioManager.cc and ambientAudioManager.h from compilation;
- Remove all the engine\audio files from project and add only the files included in this packet;

How it works:
It centralize all the audio functions into a global object called AudioManager, you can check the included audioEmitter.cc to see how can you directly use the interface.

It also includes a oldaudio.cc file that is a wrapper to the new interface, this way you can still use the alxNNNN() functions where needed, example:
void alxListenerMatrixF(const MatrixF *transform, const Point3F *velocity)
{
   AudioManager->setListenerTransform(transform, velocity);
}


* Note that this is an old code, the audio layer is being rewritten from scratch to support multiple API's such as DirectSound and OpenAL. This code is also windows only, but should't be difficult to port it by adapting the platform audio.

* If you have problems on windows XP please download the default latest openal here and put in your game directory, also you will need to delete your original OpenAL32.dll from System32 directory so the game can run the supplied one.
Page«First 1 2 3 Next»
#41
02/28/2005 (5:02 pm)
Hello -

I am a bit of a newbie to this, what is the HEAD resource you discuss in the instructions/comments?? (is this the downloaded SDK from GG??) Also, how does one apply the patch to this head. I am using Visual Studio 7.1

Thanks...Craig
#42
03/01/2005 (7:58 am)
@ Marcelo - Thanks for the reply.

Nothing shows in the client console about missing files (which is what I usually look for with problems like that) but I will make a thorough check to make sure.
#43
03/02/2005 (11:02 pm)
Not too sure how to add the files using the project linker?
Where do i find the project linker in VC++ 6 and how do i use it?
cheers
#44
03/07/2005 (5:59 pm)
Great!!! Managed to implement this at last, the answers are all here in the various posts - Way Cool . Thanks for solving this annoying bug!!!!
Craig
#45
03/08/2005 (11:34 am)
Just to update the problem I was having above - it was a missing audio file after all :~(

I have been using the same test level for a couple of months now and the new audio was the first time it refused to join a client but its fixed and the sound is much better.

I have noticed vastly different performance with different sound cards though - for example, on an Audigy 2 card, most sounds play regardless of distance (i.e you hear things you are not supposed to hear if the max distance was being applied correctly) but they do play with a time delay directly in relation to the distance of the sound from the observer which gives a very physically correct impression. Its also a good cheat as you can hear what other players are doing (weapon selection, footsteps etc) when they are too far away to hear you :)

One other point - the openal.dll referred to above does not work on some win2k/SB Live card combinations. The latest openal.dll from creatives dev site (released Feb 05) works perfectly though.
#46
04/03/2005 (9:46 am)
Marcelo did a good work with this, but there is a fix to 1.3 release here.
#47
04/06/2005 (12:37 am)
@Marcelo - What is the status on the rewrite?
#48
05/12/2005 (8:56 pm)
Hi all,
#49
05/12/2005 (9:00 pm)
Hi all, this upgrade is just what I need, however am I understanding correctly that its a Windows only solution?


Cheers thanks

Tim
#50
06/03/2005 (7:11 pm)
Has anyone had any issues with the alxListenerf(AL_GAIN_LINEAR, %volume) call to set the master volume not working?
#51
06/06/2005 (12:36 pm)
Anyone have a version of this that works on Linux?
#52
06/06/2005 (12:51 pm)
I'd like to echo EddieRay's question... and add to it... if there's no forseable issues with using this across platforms, I'm willing to make the effort and post an update here for what I had to do to get it to work (or the alternate update of "this is b0rk for non-MS").
#53
06/29/2005 (1:16 am)
Please do, I would be very interested in cross-platform support for this resource.
#54
06/29/2005 (8:10 am)
Yes, OneST8, please do!
#55
07/01/2005 (4:48 pm)
TGE caused an invalid page fault in
module OPENAL32.DLL at 0177:100036d9.
Registers:
EAX=00000000 CS=0177 EIP=100036d9 EFLGS=00010246
EBX=00bcfd1c SS=017f ESP=00bcfcd0 EBP=00bcfd18
ECX=d0e95f30 DS=017f ESI=00000000 FS=5607
EDX=00bcfd18 ES=017f EDI=00bcfd20 GS=0000
Bytes at CS:EIP:
8b 06 56 89 45 00 8b 4e 04 89 0b 8b 56 08 89 17
Stack dump:
002818d3 00000400 00bcfe38 00000001 00629e30 00001004 00bcfd18 00bcfd1c 00bcfd20 002818d3 00bcfe38 00000001 ffffffff 00bcfe28 006780a0 006ab678


I need a fix for this...it happens whenever i try to start tge.....
#56
04/17/2006 (5:40 am)
Has anyone used this resource recently?

I just spent a bunch of time implementing it and everything compiles fine (after a whole bunch of re-working) but now the alcOpenDevice(NULL); call is returning NULL which is not good. That usually means there is no sound device.

There is definitely a sound device and the old Torque audio sub-system was functioning (albeit not well). Has anyone else had similar problems in trying to implement this? If so, let me know and perhaps we can figure something out.

Thanks!

Edit: The alGetError(); function returns an INVALID_VALUE error... whatever that means...

Stephane
#57
09/26/2008 (8:04 am)
Hmmm, it's been awhile since this thread was last updated. Marcelo, if your still around, or anyone, I can't stand how the maxdistance audio just cut's off with the stock audio for TGE. I really want to give this a whirl but as of this moment my game is being developed on mac and windows. Has anyone been able to get this working on a MAC?
Thx.
Page«First 1 2 3 Next»