Seeking an TGE OpenAL master (winxp) to solve this puzzle
by Martijn Segers · in Torque Game Engine · 09/11/2003 (12:44 pm) · 7 replies
I am having trouble playing sounds in the GUI .
I think OpenAL is working correctly cause I CAN HEAR the
sounds of the player walking when I have start a mission.
some facts :
- OpenAL is installed
- openal32.dll is in winsystem dir and the tga executable dir
- OpenAL is initialized correctly
( can see that in console.log )
OpenAL Driver Init:
OpenAL
Vendor: Creative Labs Inc.
Version: OpenAL 1.0
Renderer: Software
Extensions: EAX 2.0, EAX 3.0, EAX Unified, and EAX-AC3
- All volumes in defaults en prefs of all channels are set to 1
instead of the 0.8
I have created a test function : testSound(%mode) : that tries to play a sound using a profile (mode 1) and using a created Source (mode 2)
When I play the sound with mode 2 (created Source) . It says it is playing and it realy looks like it because when I execute the command again quickly it echo's me he is already playing the particular sound. But I am not hearing anything ... !!
and yes .. my headphone's volume is turned on ! :P
I think that when my testfunction will give me some sound I will have no problem linking sounds to GUI elements ..
Can NE1 get this function to work in the GUI ?
The source below I have put in a separate .cs file that is
executed in the client init.cs function just after the centerPrint.cs and just before the default.bind.cs
( is compiled and included correctly )
If I am correct the function should play a sound when
called from the console from within a GUI. The
Testing.wav should be present in the default data\sound dir.
Just doesnt work 4 me :(
--SOURCE--
new AudioDescription(AudioGuiTest)
{
volume = 1.0;
isLooping= false;
is3D = false;
type = $GuiAudioType;
};
new AudioProfile("Testing")
{
filename = "~/data/sound/Testing.wav";
description = "AudioGuiTest";
preload = true;
};
function testSound(%mode)
{
if (%mode == 1) {
alxPlay("Testing");
echo("Now playing Audioprofile 'Testing'");
}
else
if (%mode == 2) {
$audioFilename = expandFileName("~/data/sound/Testing.wav");
if (!alxIsPlaying($TestAudioHandle)) {
$TestAudioHandle = alxCreateSource("AudioChannel8",$audioFilename);
alxPlay($TestAudioHandle);
echo("now playing sound " @ $audioFilename);
}
else {
echo("already playing " @ $audioFilename);
}
}
else {
echo("Please provide a mode parameter (1/2).");
echo("1 : alxPlay a profile");
echo("2 : alxPlay a createdSource");
}
}
--ENDSOURCE--
I think OpenAL is working correctly cause I CAN HEAR the
sounds of the player walking when I have start a mission.
some facts :
- OpenAL is installed
- openal32.dll is in winsystem dir and the tga executable dir
- OpenAL is initialized correctly
( can see that in console.log )
OpenAL Driver Init:
OpenAL
Vendor: Creative Labs Inc.
Version: OpenAL 1.0
Renderer: Software
Extensions: EAX 2.0, EAX 3.0, EAX Unified, and EAX-AC3
- All volumes in defaults en prefs of all channels are set to 1
instead of the 0.8
I have created a test function : testSound(%mode) : that tries to play a sound using a profile (mode 1) and using a created Source (mode 2)
When I play the sound with mode 2 (created Source) . It says it is playing and it realy looks like it because when I execute the command again quickly it echo's me he is already playing the particular sound. But I am not hearing anything ... !!
and yes .. my headphone's volume is turned on ! :P
I think that when my testfunction will give me some sound I will have no problem linking sounds to GUI elements ..
Can NE1 get this function to work in the GUI ?
The source below I have put in a separate .cs file that is
executed in the client init.cs function just after the centerPrint.cs and just before the default.bind.cs
( is compiled and included correctly )
If I am correct the function should play a sound when
called from the console from within a GUI. The
Testing.wav should be present in the default data\sound dir.
Just doesnt work 4 me :(
--SOURCE--
new AudioDescription(AudioGuiTest)
{
volume = 1.0;
isLooping= false;
is3D = false;
type = $GuiAudioType;
};
new AudioProfile("Testing")
{
filename = "~/data/sound/Testing.wav";
description = "AudioGuiTest";
preload = true;
};
function testSound(%mode)
{
if (%mode == 1) {
alxPlay("Testing");
echo("Now playing Audioprofile 'Testing'");
}
else
if (%mode == 2) {
$audioFilename = expandFileName("~/data/sound/Testing.wav");
if (!alxIsPlaying($TestAudioHandle)) {
$TestAudioHandle = alxCreateSource("AudioChannel8",$audioFilename);
alxPlay($TestAudioHandle);
echo("now playing sound " @ $audioFilename);
}
else {
echo("already playing " @ $audioFilename);
}
}
else {
echo("Please provide a mode parameter (1/2).");
echo("1 : alxPlay a profile");
echo("2 : alxPlay a createdSource");
}
}
--ENDSOURCE--
#2
Good idea .. I Tried it immediately.
The sound I am hearing when I am walking
the player is 'Footstep_hard.wav'
* swapped sounds with 'Testing.wav'
didnt hear the footstep (as Testing) in the GUI
but did hear the Testing sound (bleep bleep)
in the Mission .. created a nice multi channel
effect .. cause the testing.wav is slightly bigger.
So the testing sound is good for OPenAL 2B played.
If you have any more suggestions dont hesitate
to reply :)
09/11/2003 (1:25 pm)
Badguy .. Good idea .. I Tried it immediately.
The sound I am hearing when I am walking
the player is 'Footstep_hard.wav'
* swapped sounds with 'Testing.wav'
didnt hear the footstep (as Testing) in the GUI
but did hear the Testing sound (bleep bleep)
in the Mission .. created a nice multi channel
effect .. cause the testing.wav is slightly bigger.
So the testing sound is good for OPenAL 2B played.
If you have any more suggestions dont hesitate
to reply :)
#3
and you will prolly discover somewhere that the profile is needing some work.
one more thing to try would be to get the nice beep sound used in the GUI already that one works and the profile for that sound work's too.. hmmm.
track it down and see which profile it use's.
09/11/2003 (1:41 pm)
Ok the next thing I would try is changing the profile you created for this sound, change it more to be like the one used for footsteps make that workand you will prolly discover somewhere that the profile is needing some work.
one more thing to try would be to get the nice beep sound used in the GUI already that one works and the profile for that sound work's too.. hmmm.
track it down and see which profile it use's.
#4
telling me that a sound is been played while I am not hearing
that particular sound ( Sound is OK and played in mission -- see post before -- when switched with the footstep sound ).
I am speaking here of testSound(2); that is not using any profile but just playing a plain sound .. using the
alxCreateSource command.
Can you tell me if this function works on your system ?
09/11/2003 (2:11 pm)
Will check that tmrrw .. but think it is better to focus on getting the testSound function to work .. because the system istelling me that a sound is been played while I am not hearing
that particular sound ( Sound is OK and played in mission -- see post before -- when switched with the footstep sound ).
I am speaking here of testSound(2); that is not using any profile but just playing a plain sound .. using the
alxCreateSource command.
Can you tell me if this function works on your system ?
#5
09/11/2003 (2:55 pm)
I'll check that out when I get home tonight and let ya know.
#6
09/13/2003 (4:38 am)
Badguy ? did you manage .. or can anyone else get the testfunction 'testSound(2);' working for him in the GUI
#7
I found a bug acknowledgement .. so that closes
this topic.
http://www.garagegames.com/projectmanager/issue.php?qis=194
09/15/2003 (11:48 am)
Mmm .. after lookin' abit further into this siteI found a bug acknowledgement .. so that closes
this topic.
http://www.garagegames.com/projectmanager/issue.php?qis=194
Torque Owner Badguy
It looks ok, one question about the file...
did you say it is included in torque?
if not have you gotten OpenAL to play this file?
for example, instead of testing.wav lets try the footstep.wav or whatever it is... cause you know that one works.
and vice versa have you renamed this one to footstep so you can hear it when you walk?