OGG causes a crash in TGE
by Sanity · in Technical Issues · 10/27/2008 (11:43 am) · 6 replies
I've set up a game to play music at the menu with an OGG file and once I open it crashes. I have a WAV version of the same file which worked perfectly but lacked proper compression (~8mb file opposed to the 714kb OGG.)
I looked in the console.log and it's crashing right at the OpenAL init. Doesn't TGE support OGG?
I looked in the console.log and it's crashing right at the OpenAL init. Doesn't TGE support OGG?
#2
new AudioDescription(AudioGui)
{
volume = 1.0;
isStreaming = true;
isLooping = true;
is3D = false;
type = $GuiAudioType;
};
new AudioProfile(musictrack)
{
filename = "~/data/sound/menumusic.ogg";
description = "AudioGui";
preload = true;
};
(In init.cs, just to make it stop playing when the main game is entered, I don't think it's relevant)
function PlayGui::onWake(%this)
{
$musicHandle = alxStop(musictrack);
}
10/27/2008 (2:36 pm)
(In audioprofiles.cs)new AudioDescription(AudioGui)
{
volume = 1.0;
isStreaming = true;
isLooping = true;
is3D = false;
type = $GuiAudioType;
};
new AudioProfile(musictrack)
{
filename = "~/data/sound/menumusic.ogg";
description = "AudioGui";
preload = true;
};
(In init.cs, just to make it stop playing when the main game is entered, I don't think it's relevant)
function PlayGui::onWake(%this)
{
$musicHandle = alxStop(musictrack);
}
#3
10/29/2008 (8:46 am)
How was the OGG created and processed? Try creating a mono version and seeing if it works.
#4
10/29/2008 (4:56 pm)
I used both Soundforge and Goldwave and they both caused a crash. I tried stripping the metadata, didn't work. Tried stereo and mono. Is there an updated OpenAL32.dll out there I can use?
#5
Other than that I use pretty much the same AudioDescription and AudioProfile, only the names are different. And I've used mono and stereo .ogg files @44.1khz. It shouldn't matter which but stereo does sound better (left and right). The only time you don't want to use stereo is for 3d positional sounds.
You didn't say how you start your music playing, but I start my menumusic when the MainMenuGUI wakes:
One other question: are you defining your AudioDescription and AudioProfiles for your GUIs on the client or serverside? They should be on the client.
10/29/2008 (8:06 pm)
What engine are you using? I've never seen isStreaming used in a AudioDescription before in TGE.Other than that I use pretty much the same AudioDescription and AudioProfile, only the names are different. And I've used mono and stereo .ogg files @44.1khz. It shouldn't matter which but stereo does sound better (left and right). The only time you don't want to use stereo is for 3d positional sounds.
You didn't say how you start your music playing, but I start my menumusic when the MainMenuGUI wakes:
function mainMenuGui::onWake(%this)
{
if (!alxIsPlaying($musicHandle))
$musicHandle = alxPlay(menuMusic);
}One other question: are you defining your AudioDescription and AudioProfiles for your GUIs on the client or serverside? They should be on the client.
#6
I'm editing the audioprofiles.cs in fps\client\scripts because that's the only audioprofiles script I could find.
fps/client/init.cs
function MainMenuGui::onWake(%this)
{
// Play music...
$musicHandle = alxPlay(musictrack);
}
MainMenuGUI didn't have its own cs file and I didn't want to be bothered making one cause it works fine in init.cs.
10/30/2008 (8:18 pm)
I don't know the engine for sure. I think it's torque game engine. The folders are like fps, editor, common. I'm not a real programmer I'm just modding a game a bit.I'm editing the audioprofiles.cs in fps\client\scripts because that's the only audioprofiles script I could find.
fps/client/init.cs
function MainMenuGui::onWake(%this)
{
// Play music...
$musicHandle = alxPlay(musictrack);
}
MainMenuGUI didn't have its own cs file and I didn't want to be bothered making one cause it works fine in init.cs.
Associate Michael Hall
Distracted...
EDIT: punctuation