2D sounds not working
by Andy Schatz · in Torque Game Engine · 08/03/2005 (1:32 pm) · 5 replies
I'm having the problem that 2D sounds only work some of the time.
Ambient Track (looping, 2d) -- WORKS
Rain loop (looping 3d) -- WORKS
Animal sounds (some looping, some not looping, all 3D) -- WORKS
Thunder Sound (not looping, 2D) -- DOESN'T PLAY
GUI Sounds (not looping, 2D) -- DOESN'T PLAY
I've tried switching the Thunder to use the same audio profiles as the ambient track as a test, but it still doesn't play. The only thing that gets the thunder sound to work is if I switch it to a 3d sound.
The thing that's weird to me is that I KNOW 2d sounds work, since I play music during the UI, and then I switch to an ambient track during gameplay.
I've stepped through the code in audio.cc, and it appears that everything goes through correctly. And its not the location in my code that I am playing the sound that is the problem... I play the rain sound right next to the thunder sound and that works fine.
BTW, I commented out the call to alxUpdateMaxDistance per another thread on these forums to get my loopers to update their 3d volume correctly, but I don't think that has anything to do with my current problem.
Anyone have any idea what's wrong?
Ambient Track (looping, 2d) -- WORKS
Rain loop (looping 3d) -- WORKS
Animal sounds (some looping, some not looping, all 3D) -- WORKS
Thunder Sound (not looping, 2D) -- DOESN'T PLAY
GUI Sounds (not looping, 2D) -- DOESN'T PLAY
I've tried switching the Thunder to use the same audio profiles as the ambient track as a test, but it still doesn't play. The only thing that gets the thunder sound to work is if I switch it to a 3d sound.
The thing that's weird to me is that I KNOW 2d sounds work, since I play music during the UI, and then I switch to an ambient track during gameplay.
I've stepped through the code in audio.cc, and it appears that everything goes through correctly. And its not the location in my code that I am playing the sound that is the problem... I play the rain sound right next to the thunder sound and that works fine.
BTW, I commented out the call to alxUpdateMaxDistance per another thread on these forums to get my loopers to update their 3d volume correctly, but I don't think that has anything to do with my current problem.
Anyone have any idea what's wrong?
#2
What's odd is that if I switch Thunder.ogg (which doesn't play) with another filename, it works. Yet, this all works fine with thunder.ogg if I simply change it to a 3d sound.
I also tried reordering some of my AudioProfiles and it managed to fix one of them (but not this one). Arrggghhh!!
08/03/2005 (10:30 pm)
Here are some AudioProfiles and Descriptions:What's odd is that if I switch Thunder.ogg (which doesn't play) with another filename, it works. Yet, this all works fine with thunder.ogg if I simply change it to a 3d sound.
I also tried reordering some of my AudioProfiles and it managed to fix one of them (but not this one). Arrggghhh!!
datablock AudioDescription(Audio2D)
{
volume = 1.0;
isLooping = false;
is3D = false;
type = $SimAudioType;
};
datablock AudioDescription(AudioLooping2D)
{
volume = 1.0;
isLooping = true;
is3D = false;
type = $SimAudioType;
};
new AudioDescription(AudioMusic)
{
volume = 1.0;
isLooping= true;
is3D = false;
type = $AmbientAudioType;
};
new AudioProfile(AudioAmbientDay)
{
filename = "~/data/sound/DayAmbienceLoop.ogg";
description = "AudioMusic";
preload = false;
};
datablock AudioProfile(RainSound)
{
filename = "~/data/sound/rain.ogg";
description = AudioFarLooping3d;
preload = true;
};
datablock AudioProfile(ThunderSound)
{
filename = "~/data/sound/thunder.ogg";
description = Audio2D;
preload = true;
};
#3
08/04/2005 (5:21 am)
Going on vacation i make it a try when i come home if you havent found a sollution.
#4
To reiterate: SOME 2d sounds simply won't play. I was able to solve one of them by reordering the AudioProfiles in the script file, but not the others. The sounds play fine if I switch them to be 3d, so I know there's nothing wrong with my AudioProfile or sound file.
Thanks in advance...
08/07/2005 (12:25 pm)
Bumping this up -- Sorry, it's a high priority for me to fix this. Does anyone out there have any idea of what's going on? Or has anyone encountered this before?To reiterate: SOME 2d sounds simply won't play. I was able to solve one of them by reordering the AudioProfiles in the script file, but not the others. The sounds play fine if I switch them to be 3d, so I know there's nothing wrong with my AudioProfile or sound file.
Thanks in advance...
#5
Mail me that thunder.ogg so i can check it .
Your Datablock looks ok , and i have tried all things and i got all my thundersounds work in 2d or 3d , ogg or wave , and dont have any more hints ,yet :)
08/09/2005 (1:47 pm)
Back :)Mail me that thunder.ogg so i can check it .
Your Datablock looks ok , and i have tried all things and i got all my thundersounds work in 2d or 3d , ogg or wave , and dont have any more hints ,yet :)
Torque 3D Owner Billy L