View our Privacy Policy
Copyright © 2000 - 2005
All Rights Reserved
Sound Upgrade
Avg. Rating (of 6) 4.8
Basic Information
Author: Marcelo Oliveira (Dec 15, 2004)
Categories: Patches
Code File: newaudio.zip

Synopsis:
This is a refactoring of the TGE audio code, featuring: - Precise falloff: Inserts a linear component into the sound rollout, meaning that the sound will gradually fade to zero instead of cutting off due to distance - Code cleanup: Rewriting of all the code to provide an common and clean interface. - Volume priority: Intelligent use of the source handles to keep only the highest importance sounds playing. - Doppler enabled. - Optimization: Sound changes are batched and updated only when needed.

Keywords:
openal audio sound falloff ogg vorbis doppler

Article:
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.

Submit ResourceSubmit your own resources!

Billy   (Dec 15, 2004 at 11:28 GMT)
Great Marcelo !!

I give it a try .

Katrina Rose   (Dec 15, 2004 at 12:11 GMT)
I am getting 32 error in guiAviBitmapCtrl.cc and guiAviBitmapCtrl.h:

c:\temp\Lighting Pack 1.3\SynapseGaming\contentPacks\LightingPack\engine\gui\guiAviBitmapCtrl.h(49): error C2146: syntax error : missing ';' before identifier 'mWavHandle'

I can't figure out what's wrong. Any help is apreciated.

Marrion Cox
Edited on Dec 15, 2004 16:01 GMT

Marcelo Oliveira   (Dec 15, 2004 at 12:43 GMT)
Marrion,

Try changing the line 26 from #include "audio/audio.h" to #include "audio/oldaudio.h", I've not included it since the control is disabled in the HEAD version I think.

Maybe you'll need to fix these "mIs3d", "mVolume" and "mIsLoopiong" to "is3d", "volume" and "isLooping" only. Remove the m prexif in all the AudioDescription members.
Edited on Dec 15, 2004 12:46 GMT

Katrina Rose   (Dec 15, 2004 at 12:51 GMT)
Thanks Marcelo,

I am now down to 13:

Anything else I need to change?

Thanks again for your help Marcelo,

Marrion Cox
Edited on Dec 15, 2004 16:01 GMT

Katrina Rose   (Dec 15, 2004 at 13:01 GMT)
If I change audio/oldAudio.h to platform/platformAudio.h it passes this, but gives these errors:

Torque Demo error LNK2019: unresolved external symbol "unsigned int __cdecl alxCreateSource(struct Audio::Description const *,char const *,class MatrixF const *,class AudioSampleEnvironment *)" (?alxCreateSource@@YAIPBUDescription@Audio@@PBDPBVMatrixF@@PAVAudioSampleEnvironment@@@Z) referenced in function "protected: bool __thiscall GuiAviBitmapCtrl::sndOpen(void)" (?sndOpen@GuiAviBitmapCtrl@@IAE_NXZ)
Torque Demo error LNK2019: unresolved external symbol "unsigned int __cdecl alxCreateSource(class AudioProfile const *,class MatrixF const *)" (?alxCreateSource@@YAIPBVAudioProfile@@PBVMatrixF@@@Z) referenced in function "public: virtual void __thiscall GuiIconCtrl::onMouseDown(struct GuiEvent const &)" (?onMouseDown@GuiIconCtrl@@UAEXABUGuiEvent@@@Z)
Torque Demo error LNK2019: unresolved external symbol _ov_time_total referenced in function "public: virtual bool __thiscall VorbisStream::attachStream(class Stream *)" (?attachStream@VorbisStream@@UAE_NPAVStream@@@Z)
Torque Demo error LNK2019: unresolved external symbol _ov_pcm_total referenced in function "public: virtual bool __thiscall VorbisStream::attachStream(class Stream *)" (?attachStream@VorbisStream@@UAE_NPAVStream@@@Z)
Torque Demo error LNK2019: unresolved external symbol _ov_info referenced in function "public: virtual bool __thiscall VorbisStream::attachStream(class Stream *)" (?attachStream@VorbisStream@@UAE_NPAVStream@@@Z)
Torque Demo error LNK2019: unresolved external symbol _ov_open_callbacks referenced in function "public: virtual bool __thiscall VorbisStream::attachStream(class Stream *)" (?attachStream@VorbisStream@@UAE_NPAVStream@@@Z)
Torque Demo error LNK2019: unresolved external symbol _ov_clear referenced in function "public: virtual void __thiscall VorbisStream::detachStream(void)" (?detachStream@VorbisStream@@UAEXXZ)
Torque Demo error LNK2019: unresolved external symbol _ov_pcm_tell referenced in function "public: virtual unsigned int __thiscall VorbisStream::getPosition(void)const " (?getPosition@VorbisStream@@UBEIXZ)
Torque Demo error LNK2019: unresolved external symbol _ov_pcm_seek referenced in function "public: virtual bool __thiscall VorbisStream::setPosition(unsigned int)" (?setPosition@VorbisStream@@UAE_NI@Z)
Torque Demo error LNK2019: unresolved external symbol _ov_time_tell referenced in function "public: virtual float __thiscall VorbisStream::getTime(void)" (?getTime@VorbisStream@@UAEMXZ)
Torque Demo error LNK2019: unresolved external symbol _ov_time_seek referenced in function "public: virtual bool __thiscall VorbisStream::setTime(float)" (?setTime@VorbisStream@@UAE_NM@Z)
Torque Demo error LNK2019: unresolved external symbol _ov_read referenced in function "protected: virtual bool __thiscall VorbisStream::_read(unsigned int,void *)" (?_read@VorbisStream@@MAE_NIPAX@Z)
Torque Demo fatal error LNK1120: 12 unresolved externals


I think that Audio in oldAudio.h does not contain the same things as platformAudio. I am not a C++ programmer by trade, so I don't know for sure why this does not work. Any help is apreciated.

Marrion Cox

Katrina Rose   (Dec 15, 2004 at 13:29 GMT)
If I disable guiAviBitmapCtrl.cc then I still get the above errors. Any idea What these error mean?

Marrion

After changing the lib files in links and disabling a couple of things in my guiIconCtrl it now compiles just fine.

Thanks again,

Marrion
Edited on Dec 15, 2004 16:03 GMT

Marcelo Oliveira   (Dec 15, 2004 at 13:48 GMT)
Marrion,

Did you followed the install instructions? Seems that it's not linking the ogg libraries. If so, try a rebuild all.

Also, I don't have this GuiIconCtrl class here, but I think that the problems is the same, change to oldaudio.h.

Please edit your posts to clean the space, if there's still any building errors please send it to marcelo@greenlandstudios.com

Westy   (Dec 15, 2004 at 20:24 GMT)
Is the going into HEAD GG?

David Dougher   (Dec 15, 2004 at 22:55 GMT)
OK. I have this working correctly and it is a noticible improvement to the audio, but I wonder - what is the purpose of the empty file audioFunctions.cc? Is it there for some type of compatibility reason?

David Dougher   (Dec 15, 2004 at 22:58 GMT)
@Westy,

Probably not, since if you read it carefuly he has said that this is part of a larger project he is doing for GG. This is not cross-platform and he is redoing the whole thing to use OpenAl or DirectSound3D natively.

Katrina Rose   (Dec 16, 2004 at 11:23 GMT)
After changing all my music to mono the distance falloff is working, but for some reason the pitch is changing when I move around inside the sphere. All my music/audio files are:

Mono, 44100Hz, 16-Bit, OGG

Is this correct? I noticed that the stocl TGE audio files are 22050. Is the pitch of my audio files changing because of this? Mabie some of my code is wrong? I tried changing my ogg files into wav but they are doing the same thing.

Update: The pitch only changes while I am moving; when I stop the pitch goes back to normal. Is there any way to fix this?

Update: Doppler is in:

C:\temp\Lighting Pack 1.3\SynapseGaming\contentPacks\LightingPack\engine\audio\audio.cc(161): alDopplerFactor(0);
C:\temp\Lighting Pack 1.3\SynapseGaming\contentPacks\LightingPack\engine\audio\audio.cc(163): //alDopplerFactor(0);
C:\temp\Lighting Pack 1.3\SynapseGaming\contentPacks\LightingPack\engine\audio\audio.cc(164): //alDopplerVelocity(1);

but alDopplerFactor is not defined anywhere. That's the only doppler in Torque. What do I change to disable it?


Thanks for your help,

Marrion
Edited on Dec 16, 2004 12:30 GMT

Jackie Hayes   (Dec 16, 2004 at 12:10 GMT)   Resource Rating: 5
Marcelo

I have integrated your resource and it works fine for me except for interiors. I have a wind sound effect that loops continuously while the player is outside. When the player goes into any interior the wind sound effect keeps playing. Before the upgrade the effect always dropped off when ever you enter an interior.

Any ideas??? I'll start digging into this and post what I find. I was just curious if you have encountered this yourself.

Thanks

Marcelo Oliveira   (Dec 16, 2004 at 12:17 GMT)
Westy: I think not, due to the reason David posted.

David: audioFunctions.cc is there because I forgot to delete it. :)

Marrion: This should be the doppler effect, you can disable it or attenuate it, search your .cc files for doppler.

Jackie: I dropped ambientAudioManager.cc due to compatibility vs. time problems, but you can reintegrate it.

Billy   (Dec 16, 2004 at 13:17 GMT)
@Marcelo
I have a problem
When i use ogg files it works really good but when i use the wave files all my sounds , sounds like a humblebee or something.
And it doesnt matter if it is a emitter or player sound.
Tried differnt OpenAl.dll but it didnt help.
Any hints ?

Used test version SDK 1.3 , Soundcards Sblive.
Edited on Dec 16, 2004 13:19 GMT

Marcelo Oliveira   (Dec 16, 2004 at 15:26 GMT)
@Billy,
That's really strange, since both the wav and ogg files are filtered to raw PCM stream before being played on OpenAL, these errors happens when you run torquedemo?

That's why we decided to move on to a multiple API support, unfortunately OpenAL seem to be very buggy at the moment, at least at windows platform.

Billy   (Dec 16, 2004 at 18:58 GMT)
@Marcelo
I use SDK 1.3 starter.fps and the only thing added is this patch.
I moved some of my working wave files from my game , converted them to all kind
of wave formats and get the beep sound on all emitters.
Strange thing.
Edited on Dec 16, 2004 20:37 GMT

Jackie Hayes   (Dec 16, 2004 at 22:05 GMT)   Resource Rating: 5
Marcelo

I too am in the same boat with time. I will try and address my issues later. I do like your updates though. I have gone back to my original audio design. I have everything working fine using it like directional audio, looping audio, full EAX support....etc..... When I get some more time I'll get back on this.

This is a good resource!
Thanks....

Marcelo Oliveira   (Dec 16, 2004 at 22:15 GMT)
@Billy: If I understood, this problem happens even on the original starter.fps?
Have you tried this? "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."
Because the only problem I was having was fixed in this dll version.


@Jackie: I was developing EAX support too, but I've stopped it to work on the new interface. :)

Jackie Hayes   (Dec 17, 2004 at 02:59 GMT)   Resource Rating: 5
Good deal Marcelo. I really like how you have this all cleaned up. I look forward to seeing your updates. Let me know if I can be of any help to you.

Thanks....

Stevie   (Dec 19, 2004 at 16:44 GMT)
I have never patched anythink before - can someone please tell me how i implement the new audio features - please exaplain to a complete beginnner with patching....


Steve

Stevie   (Dec 20, 2004 at 10:14 GMT)
Anyone help with implementing this. It says copy the files over the directory. Does it mean the files contained in this zip, and if so which part of the torque directory does it want me to copy over??

Also how do i merge the files?

Chris Robertson   (Dec 21, 2004 at 18:38 GMT)
Marcelo - just wanted to say what a great resource this is. It appears to solve a long standing memory leak caused by streaming ogg files, and the quality of the audio is much improved.

Thanks for all your hard work.

Stevie   (Dec 21, 2004 at 20:16 GMT)
Can someone please guide me through how i patch the upgrade in please?
i have read lots of docs on this but still am confused

Katrina Rose   (Dec 22, 2004 at 11:02 GMT)
Hi Stevie,

(from John Kabus)

-Download GNU utilities for Win32 from here: unxutils.sourceforge.net
-Unzip GNU Win32 onto your hard drive.
-Copy the newaudio.patch file into your Torque Folder.
-Open the command prompt navigate to the ´torque´ folder.
-Enter the command ´<the path to GNU Win32>\patch.exe -p0 --binary < newaudio.patch´ and hit enter.


This is how I did it and it works great.

Thanks John Kabus,

Marrion Cox
Edited on Dec 22, 2004 11:03 GMT

Stevie   (Dec 22, 2004 at 15:20 GMT)
Thankyou for your guide aboth - this is very simple to the point and i understand - much apreciated.

Stevie

Stevie   (Dec 23, 2004 at 00:49 GMT)
I get all these errors:
--------------------Configuration: Torque Demo - Win32 Release--------------------
Compiling...
guiAviBitmapCtrl.cc
Linking...
projectile.obj : error LNK2001: unresolved external symbol "void __cdecl alxSourceMatrixF(unsigned int,class MatrixF const *,class Point3F const *)" (?alxSourceMatrixF@@YAXIPBVMatrixF@@PBVPoint3F@@@Z)
shapeBase.obj : error LNK2001: unresolved external symbol "void __cdecl alxSourceMatrixF(unsigned int,class MatrixF const *,class Point3F const *)" (?alxSourceMatrixF@@YAXIPBVMatrixF@@PBVPoint3F@@@Z)
shapeImage.obj : error LNK2001: unresolved external symbol "void __cdecl alxSourceMatrixF(unsigned int,class MatrixF const *,class Point3F const *)" (?alxSourceMatrixF@@YAXIPBVMatrixF@@PBVPoint3F@@@Z)
hoverVehicle.obj : error LNK2001: unresolved external symbol "void __cdecl alxSourceMatrixF(unsigned int,class MatrixF const *,class Point3F const *)" (?alxSourceMatrixF@@YAXIPBVMatrixF@@PBVPoint3F@@@Z)
vehicle.obj : error LNK2001: unresolved external symbol "void __cdecl alxSourceMatrixF(unsigned int,class MatrixF const *,class Point3F const *)" (?alxSourceMatrixF@@YAXIPBVMatrixF@@PBVPoint3F@@@Z)
wheeledVehicle.obj : error LNK2001: unresolved external symbol "void __cdecl alxSourceMatrixF(unsigned int,class MatrixF const *,class Point3F const *)" (?alxSourceMatrixF@@YAXIPBVMatrixF@@PBVPoint3F@@@Z)
player.obj : error LNK2001: unresolved external symbol "void __cdecl alxSourceMatrixF(unsigned int,class MatrixF const *,class Point3F const *)" (?alxSourceMatrixF@@YAXIPBVMatrixF@@PBVPoint3F@@@Z)
game.obj : error LNK2001: unresolved external symbol "void __cdecl alxListenerMatrixF(class MatrixF const *,class Point3F const *)" (?alxListenerMatrixF@@YAXPBVMatrixF@@PBVPoint3F@@@Z)
main.obj : error LNK2001: unresolved external symbol "public: static void __cdecl ALManager::create(void)" (?create@ALManager@@SAXXZ)
main.obj : error LNK2001: unresolved external symbol "class ResourceInstance * __cdecl constructVorbis(class Stream &)" (?constructVorbis@@YAPAVResourceInstance@@AAVStream@@@Z)
main.obj : error LNK2001: unresolved external symbol "class ResourceInstance * __cdecl constructWave(class Stream &)" (?constructWave@@YAPAVResourceInstance@@AAVStream@@@Z)
main.obj : error LNK2001: unresolved external symbol "public: static void __cdecl ALManager::destroy(void)" (?destroy@ALManager@@SAXXZ)
guiButtonBaseCtrl.obj : error LNK2001: unresolved external symbol "unsigned int __cdecl alxCreateSource(class AudioProfile const *,class MatrixF const *,class Point3F const *)" (?alxCreateSource@@YAIPBVAudioProfile@@PBVMatrixF@@PBVPoint3F@@@Z)
guiMLTextCtrl.obj : error LNK2001: unresolved external symbol "unsigned int __cdecl alxCreateSource(class AudioProfile const *,class MatrixF const *,class Point3F const *)" (?alxCreateSource@@YAIPBVAudioProfile@@PBVMatrixF@@PBVPoint3F@@@Z)
guiTextEditCtrl.obj : error LNK2001: unresolved external symbol "unsigned int __cdecl alxCreateSource(class AudioProfile const *,class MatrixF const *,class Point3F const *)" (?alxCreateSource@@YAIPBVAudioProfile@@PBVMatrixF@@PBVPoint3F@@@Z)
../example/synapseGaming.exe : fatal error LNK1120: 7 unresolved externals
Error executing link.exe.

Wha am i doing wrong? anyone please?

Digital Dave   (Dec 23, 2004 at 06:01 GMT)   Resource Rating: 5
Awesome work Marcelo

Akio   (Dec 23, 2004 at 21:15 GMT)
Stevie,

I had a similiar problem as you and this is what I did to correct it:
1) in reference to "Remove all the engine\audio files from project and add only the files included in this packet", I had to also remove these files from the build:
audioStreamSourceFactory.cc, vorbisStreamSource.cc, and wavStreamSource.cc
And be sure to include any source files that came with the .zip file.

2) change the include lib from 'vorbis_static_mt.lib' to 'vorbisfile_static.lib'

3) clean and rebuild it.

I hope that helps.
Edited on Dec 23, 2004 21:16 GMT

Erik Madison   (Dec 25, 2004 at 10:17 GMT)
With a bit of work, I've gotten this to restore sounds to TSE as well. WooHoo!

Stevie   (Dec 26, 2004 at 20:54 GMT)
with respects to the following line:


Add lib\vorbis\win32\ogg_static.lib and lib\vorbis\win32\vorbisfile_static.lib to your project linker

As i am a new C++ user can someone please explain how i do this.
Also when it says unzip the contents into the torque directory. Does this mean the root directory? or a specific folder?

Steve

Jameson Bennett   (Dec 28, 2004 at 20:14 GMT)
Nice work and great cleanup! Addresses a poor lil neglected area of the codebase. Definitely a great candidate for test and addition to the HEAD!

Stevie   (Dec 31, 2004 at 16:21 GMT)
Hi,

I am still trying to compile this - i am now down to 4 errors as follows:
audioDataBlock.cc
audioFunctions.cc
audioStreamSourceFactory.cc
fatal error C1083: Cannot open source file: 'C:\TGE NOW WORKS\contentPacks\LightingPack\engine\audio\audioStreamSourceFactory.cc': No such file or directory
vorbisStream.cc
vorbisStreamSource.cc
fatal error C1083: Cannot open source file: 'C:\TGE NOW WORKS\contentPacks\LightingPack\engine\audio\vorbisStreamSource.cc': No such file or directory
wavStreamSource.cc
fatal error C1083: Cannot open source file: 'C:\TGE NOW WORKS\contentPacks\LightingPack\engine\audio\wavStreamSource.cc': No such file or directory
sgLightManager.cc
sgLightMap.cc
sgNewMethods.cc
sgSceneLighting.cc
sgTSStatic.cc
sgUniversalStaticLight.cc
Error executing cl.exe.

synapseGaming.exe - 4 error(s), 0 warning(s)

Anyone help please?

Akio   (Dec 31, 2004 at 16:27 GMT)
remove these files from the build:
audioStreamSourceFactory.cc, vorbisStreamSource.cc, and wavStreamSource.cc

Stevie   (Dec 31, 2004 at 16:30 GMT)
Hi

if i remove the above u mentioned, i get 71 errors!! If remove what u said, except audiostreamsourcefactory.cc i get just 1 error as follows:

Build : warning : failed to (or don't know how to) build 'C:\TGE NOW WORKS\contentPacks\LightingPack\engine\audio\audioStreamSourceFactory.cc'
Compiling...
audioStreamSourceFactory.cc
fatal error C1083: Cannot open source file: 'C:\TGE NOW WORKS\contentPacks\LightingPack\engine\audio\audioStreamSourceFactory.cc': No such file or directory
Error executing cl.exe.

synapseGaming.exe - 1 error(s), 1 warning(s)

Akio   (Dec 31, 2004 at 16:37 GMT)
That's odd. Did you clean it first?

Stevie   (Dec 31, 2004 at 16:39 GMT)
i did a clean build - is that what u mean?

i am gonna start afresh now - and see what i come up with. How come this doesnt all work correctly from the patch?

i did exactly what John said above

Steve

Akio   (Dec 31, 2004 at 16:50 GMT)
Errors you're seeing is because Marcelo's patch is applied to Release 1.3, and not the lighting pack. What you need to do is make a note of what files are changed in the patch, get some ideas of what changes are made in those files, and compare that to similar calls being made in the lighting pack source files.

This will take some work on your end but the errors are provided in the compile output window, so you should be able to go directly to where the errors are and make appropriate changes.

Keith Johnston   (Jan 01, 2005 at 12:48 GMT)
During the course of this refactoring, did you discover what causes the current memory leak in head in the ogg streaming support? Is it a bug in torque or in the ogg libraries?

Digital Dave   (Jan 02, 2005 at 22:21 GMT)   Resource Rating: 5
While it seems that memory leaks have been vanquished, I'm also intersted to hear your reply to Keith's question.

If it's possible, can you also explain any of the particulars of why XP has its own apparently unique difficulties?

Thanks
Edited on Jan 02, 2005 22:21 GMT

Marcelo Oliveira   (Jan 02, 2005 at 23:56 GMT)
@Stevie,
The patch was to the HEAD version only, but looking at the last error you posted, you should remove audioStreamSourceFactory.cc and audioStreamSourceFactory.h from your project and also remove the reference to the .h, I believe that it's in main.cc, search in files for the #include

@Keith,
No, but seems that this leak disappeared at all, the one big difference is that I'm using the vorbisfile library instead of the engine "hacked" one, this way we can easily keep up-to-date with the latest version of the ogg code.

@Dave,
Mainly there are two bugs with XP:

The first one only happens under a stress test condition when you play a lot of sounds together makes the game crashes (on openal32.dll thread) on some machines, but it doesn't happen with the latest openal dll (supplied in the resource link)

The second one is still reproductible in this version I think, try to modify the alDopplerFactor from something like 0.1 and all the sounds (even the "2d" ones) get screwed up.

Also, by using the debug version of the openaldll it reports aways two or three "unfreed" sound buffers on application exit, but I put Con::Printf() in all the buffer generation and delete functions and found that I was correctly deleting all the buffers, so I suppose that it also is a openal problem.

Unfortunately openal seems to be very bugged in the Windows at least, that's why we decided to also include DirectSound support.

Clint S. Brewer   (Jan 04, 2005 at 07:16 GMT)
Marcelo said:
Quote:


Also, by using the debug version of the openaldll it reports aways two or three "unfreed" sound buffers on application exit, but I put Con::Printf() in all the buffer generation and delete functions and found that I was correctly deleting all the buffers, so I suppose that it also is a openal problem.



you might want to check for alGetError before and after your call to alDeleteBuffers it might be that there is an error deleting it, for instance if the source is playing it or if it is queued to be played. I ran into this with the 1.3 audio system.
see discussion here

Digital Dave   (Jan 04, 2005 at 07:56 GMT)   Resource Rating: 5
Not sure if I should report this here, but I've had this error on 2 different machines:

------------
Fatal: (G:\STUFF\Software\Torque_PC\engine\audio\oldaudio.cc@64)

alxCreateSource, using non-null handle
-------------

Marcelo Oliveira   (Jan 04, 2005 at 11:12 GMT)
@Clint,
Yes, I've done it when testing, but I'll re-check it again soon.

@Dave,
That's strange since it's a very simple stack management, this assert never appeared here, can you check if it's correctly doing garbage collecting on alxUpdate() ?

Digital Dave   (Jan 15, 2005 at 05:29 GMT)   Resource Rating: 5
We can't be sure yet that we aren't getting this 'using a non-null handle' as a symptom of something else. I was sure you could tell us where to look though. We'll post again here when we have a definite answer.

Craig Gibbons   (Jan 31, 2005 at 01:59 GMT)   Resource Rating: 4
Hello
Thanks for the useful resource. I am having some trouble in the build with regard to the building Precipitation.cc and PathedInterior.cc and their AUDIOHANDLE mAudioHandle. These objects are referenced/created within the oldaudio.cc file (after the upgrade) How can these be accessed to build successfully (does this need re-direction?)

Also, error on Audio::bindEAX - declared as not a member of audio , can this be explained??

Thanks, Craig

Joe Doyle   (Feb 12, 2005 at 18:26 GMT)
Great Resource! It fixed a few bugs I was having with sound. It also compiled for me without any changes using 1.3.

-Joe

Josef Jahn   (Feb 25, 2005 at 21:14 GMT)
I'm trying to get this to work in the TSE, and I'm down to a single compiler problem now.
I get the following error in player.cc, shapeBase.cc and pathedInterior.cc:


c:\Work\rats\engine\game\player.cpp(562) : error C2027: use of undefined type 'AudioP
rofile'
../engine\audio/audio.h(305) : see declaration of 'AudioProfile'
c:\Work\rats\engine\game\player.cpp(562) : error C2227: left of '->getId' must point
to class/struct/union


The code looks like this:


   for ( i = 0; i < MaxSounds; i++)
if (stream->writeFlag(sound[i]))
stream->writeRangedU32(packed? SimObjectId(sound[i]):
sound[i]->getId(),DataBlockObjectIdFirst,DataBlockObj
ectIdLast);


AudioProfile is just defined like this:


class AudioProfile;


That's basically it. Any clues what I did wrong?



UPDATE:

Instead of whining I could've just included...

#include "audio/audioDataBlock.h"

...to make the error go away. Duh.
Edited on Feb 25, 2005 21:29 GMT

David Barr   (Feb 28, 2005 at 21:24 GMT)
I have added this resource to a Lighting pack modified TGE and the sound is a much much better (I havent had a 'sound swapping' bug either which is great).

I do have one rather large problem though and wondered if anyone else has come across it (or a fix).

I have a fairly simple mission that I run specifically for testing new things. With the new audio change (the only change being the exe and dll) no one can join a hosted game. They immediately get an invalid packet error. If I swap the exe and openal.dll for the original one with no other changes then server games are fine which leads me to believe that there is a problem somewhere with the audio changes and networking. There are no problems with solo play or a hosted server (except being on your own!), just when someone tries to join a hosted server. The same thing happens if someone else runs a server - I get an immediate invalid packet error while they run around on their own.

It will be a great shame to lose the upgraded sound :(

Marcelo Oliveira   (Feb 28, 2005 at 21:46 GMT)
David Barr,

It looks like a missing wav (or ogg) file referenced at one datablock, does anything appears on client's console?

Craig Gibbons   (Mar 01, 2005 at 01:02 GMT)   Resource Rating: 4
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
Edited on Mar 01, 2005 01:13 GMT

David Barr   (Mar 01, 2005 at 15:58 GMT)
@ 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.

Tim Heldna   (Mar 03, 2005 at 07:02 GMT)
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

Craig Gibbons   (Mar 08, 2005 at 01:59 GMT)   Resource Rating: 4
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

David Barr   (Mar 08, 2005 at 19:34 GMT)
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.

Akio   (Apr 03, 2005 at 16:46 GMT)
Marcelo did a good work with this, but there is a fix to 1.3 release here.

Tom Spilman   (Apr 06, 2005 at 07:37 GMT)
@Marcelo - What is the status on the rewrite?

You must be a member and be logged in to either append comments or rate this resource.


Torque Commercial License

Newsletter Sign Up