Game Development Community

Chapter18: OpenAL32/sound: no function

by Rex · in Torque Game Engine · 07/16/2004 (7:46 am) · 3 replies

I put aside the book-following to do some GameSpace learning and now I'm back, hopefully to clear up some issues I'm having following the text.

In this Chapter(18) I had these issues: I did fine until I got to section labeled Storms. I followed the next section Setting Up Sound to the letter and that's where I noticed this:
...after following instruction#4 and looking for Exec("./interfaces/MasterScreen.gui");, I couldn't find this file at all, it is named something else, perhaps ServerScreen.gui?, since I had to edit function MasterScreen::Update to ServerScreen in Chapter6 to get that proper??

...Also named something else entirely from Chapter 5/6 setups is SetupScreen.gui, I believe in the earlier chapters, instructions are given to construct this file as "SettingsScreen.gui", I was very confused at this point, but saw a pattern emerging.

...then a few lines down in instruction #5, we see the name again in Exec("./misc/SetupScreen.cs");

I sorted that and continued. I did everything as directed and when I went to check the 'weather' I saw the particles working great, however, no sounds were apparent at all, even the UI ones, hover, etc...???

also involved with weather, I tried the calling up a 'Perfect Storm' via the the console method described. That only caused a console warning that the function for Sky object didn't exist.

the storm wasn't a big deal, but I'm wondering about my OpenAL32 issues; because when I rerun the early chapter with sound, hover, etc; works fine, so it seems like it's somewhere from there. I think it was chapter3.

Rex

PS, oh almost forgot, my player in 5/6 runs down and out of energy very quickly and doesn't seem to recharge at all, and my code is verbatim from the book, is it intended, I eventually commented out the energy drain bit so I could at least make it over to a beast to die....

About the author

Rex does all his 3D graphics through BrokeAssGames and is currently working on DSQTweaker, Ecstasy Motion, and other interesting projects yet to be revealed. Just ask him about anything DTS/DSQ related, he's happy to help.


#1
07/16/2004 (8:28 am)
In regards to the energy, you can set it to a lower number, that way it does not drain as fast. That's what I did.
#2
08/19/2004 (2:38 am)
I don't get any sound either from the storm though the Gui buttons beep.

I imagine the console errors
Object 'AudioLooping2d' is not a memeber of the 'AudioDescription' data block class

and

Object 'Audio2d' is not a memeber of the 'AudioDescription' data block class

has something to do with it.
#3
08/19/2004 (3:37 am)
After reading chapter 19 I figured out a fix.

add this code to the top of weather.cs and the storm sounds should work.

datablock AudioDescription(Audio2d)
{

volume = 1.0;
isLooping = false;
is3D = false;
type = 2;

};

datablock AudioDescription(AudioLooping2d)
{

volume = 1.0;
isLooping = true;
is3D = false;
type = 2;

};