Game Development Community

How to use FMOD in TGEA?

by Columbia_Student_001 · in Torque Game Engine Advanced · 10/12/2008 (12:57 pm) · 7 replies

Hello all, my name is Jeremy and I'm a student at Columbia College. I'm working on a game for my senior capstone project with TGEA, and my team needs FMOD for the sound. Trouble is, I have no idea how to use FMOD with respect to the engine.

I've googled this matter half to death, but documentation on Torque and FMOD is sparse to say the least. I've seen a lot of people successfully use FMOD in Torque, so it's obviously doable (plus, I know that TGEA ships with FMOD integration). I just need to know how to access FMOD via script.

I've found a few things online, such as this link:
http://www.garagegames.com/index.php?sec=mg&mod=resource&page=view&qid=2305

...And I've searched the forums. I also read the FMOD manual, but unsurprisingly, there is nothing in there on getting FMOD to interface with Torque specifically.

I would be hugely appreciative if somebody here could give me some sample script/code or at least point me in the right direction with FMOD, thanks so much!

About the author

Recent Threads


#1
10/12/2008 (3:14 pm)
The wrapper for fmod is already included in the source files by the look of things, so you would have to lisence fmod and include it's lib and header files. After that, it should work the same way as openAl.
#2
10/27/2008 (4:10 pm)
Ok, I figured it all out. To get FMOD to work in Torque, do the following:

1. Get fmodex.dll from the fmod.org website and place it in the same directory as the game EXE.

2. In game\scriptsAndAssets\client\defaults.cs, change:

* $pref::SFX::autoDetect = true; to $pref::SFX::autoDetect = false;
* $pref::SFX::provider = ""; to $pref::SFX::provider = "FMod";
* $pref::SFX::device = "Primary Sound Driver"; to $pref::SFX::device = "";

3. In game\scriptsAndAssets\client\prefs.cs:

* Set $pref::SFX::device and $pref::SFX::provider to both equal an empty string, or "".
#3
10/31/2008 (1:08 pm)
Ok, so now I have a new issue. I've got FMOD up and running with the same sound files I was using with DirectSound. My team's sound specialist needs to use the files generated in FMOD Designer, such as .FEV and .FSB files. However, I don't really know where to start with that (again, utter lack of documentation). I've tried importing the files in the same manner as I would with any other sound file as a sort of shot in the dark, but the console told me that the preload failed. Has anybody had any success integrating these files into Torque? Are there any code samples or examples that can help point me in the right direction?
#4
10/31/2008 (1:17 pm)
I currently have someone taking a stab at writing SFX documentation, as I'm focusing on documenting GFX2 and other 1.8 additions. I don't know if they will make them in for 1.8, but that's the beauty of having a dynamic doc system, as the updates will ship separate of the SDK.

On your specific inquiry, I'd have to check but I don't *think* you can load .FEV and .FSB files in stock TGEA. I'll ask around, but I'm pretty sure that would require some engine modification.

Edit- Just confirmed that this is not a supported feature.
#5
11/01/2008 (7:20 am)
Wow. In that case, what kinds of modifications do you think I would specifically have to do to the engine to use these files?
#6
11/01/2008 (1:50 pm)
I had to talk to the original coder to get an answer to your question, and here is a summary:

The problem is that what parts do you support and how. Fmod designer negates, even replaces some parts of SFX and or Torque. Event behaviors would have to be represented in Torque somehow, which is not trivial. Playback randomization could be hidden in the guts of it, but we aren't quite sure about that.

The core issue is that we would have to design the entire sound system around FMod, which means the sound system would need to "fake" things when your using providers like DirectSound, XAudio, or OpenAL which don't support much more than sound playback.

Does that help?
#7
11/08/2008 (1:30 pm)
I have not been able to get FMod to work.

Does it matter what version of fmodex.dll we have?

Is there anything else that needs to be changed besides the instructions above for defaults.cs and prefs.cs?

I am running TGEA 1.71

Please help, I can not figure out why there is nothing on enabling FMod in the documentation... nothing on sound at all really.