Game Development Community

Audio volume Options not working with options.gui

by Cheryl Gress · in Torque Game Builder · 03/27/2009 (9:10 am) · 2 replies

I'm getting an error

Unable to locate audio profile '0'

Where is this profile? Or where should it be?

#1
03/29/2009 (2:30 pm)
here's the fix

in my options.cs I did this:

// Play a test sound for volume feedback.
// if (!alxIsPlaying($AudioTestHandle))
// {
// $AudioTestHandle = alxCreateSource("AudioChannel" @ %channel,
// expandFilename("~/data/audio/volumeTest.wav"));
// alxPlay($AudioTestHandle);
//}
#2
03/29/2009 (3:03 pm)
I don't use TGB, so can't speak for it, but in TGE/a we need to declare channel assignments if we add new descriptions, for example in stock scripts for the client we have this:
// Channel assignments (channel 0 is unused in-game).
$GuiAudioType     = 1;
$SimAudioType     = 2;
$MessageAudioType = 3;
If I wanted to add a "music" channel I would add a new channel assignment, $MusicAudioType = 4; and then a new description for music -- SFXDescription(MusicAudioType){}; in TGEa and AudioDescription(MusicAudioType){}; for TGE.

I don't know if that helps, but I hope it will give you something to look for -- if things aren't too different that is.

EDIT: I mention it because I had a similar error when adding a "Music Volume" slider to the Options GUI.