Game Development Community

Cracking sound

by Gregory "Centove" McLean · in Torque Game Engine · 04/17/2004 (9:04 am) · 3 replies

Howdy,
Just bought the sdk the other day and have been tinkering a bit, after doing the openal (the openal linked/hosted on the garagegames site don't really work with cvs HEAD of torque) dance to get sound functioning I noticed I wasn't getting any sounds on the starter fps or racing demos on the menus & the console was spitting out the following message:

Unable to locate audio profile 'AudioStartup'

Digging around in the directories I discovered that yep, the AudioStartup profile wasn't there. And the AudioButtonOver profile is referencing:

filename = "~/data/sound/buttonOver.ogg";

Well thats MIA in that directory, updatedb and locate revealed it to be in the example/demo/data/sound/gui directory also located in that directory is a file startup.ogg (AHA! I bet that is for the AudioStartup profile)

so I copied the directory over, updated the example/starter.fps/client/scripts/audioProfile.cs file to point at the right files:
---
new AudioProfile(AudioButtonOver)
{
filename = "~/data/sound/gui/buttonOver.ogg";
description = "AudioGui";
preload = true;
};

new AudioProfile(AudioStartup)
{
filename = "~/data/sound/gui/startup.ogg";
description = "AudioGui";
preload = true;
};
---

This exposed a tiny problem, not sure if its something here or something in the audio system itself. When the sounds play there is, for the lack of a better description, crackling and static when it plays the sounds. I don't notice this in the actual game itself just at the main menu level. Anyone else see this?

#1
04/23/2004 (5:03 pm)
I've been experiencing this in the KDE desktop sounds but not in torque. Sometimes the sound crackels and sometimes it's like a warping of the pitch. I've seen on the KDE forums that this is/was an issue with ALSA and playing multiple sounds at once but I think that this may just be just an issue with KDE.
#2
04/27/2004 (9:28 pm)
You could try setting the audio output frequency to 44100. The default is 22050.

$Pref::Unix::OpenALFrequency = 44100;

or, you can modified the hardcoded default in audio/audio.cc (search for TORQUE_OS_LINUX in that file).
#3
04/30/2004 (3:07 pm)
Actually re-compiling OpenAL (cvs) with the --enable-asm option eliminated most of the static, there still is the odd bit but I get that in windows as well so I guess its the intel chipset issues then.