Audio Problem
by Wesley Hopson · in Torque Game Engine · 09/15/2006 (9:30 am) · 0 replies
I cannot seem to get chapter 19's audio test to work i get the error messages
AudioTest volume = 1
AudioTest object = 0
Unable to locate audio profile '0'
AudioTest volume = 0
AudioTest object = 0
Unable to locate audio profile '0'
when i try and run the function AudioTestA
new AudioDescription(AudioTest)
{
volume = 1.0;
isLooping = false;
is3D = false;
type = 0;
};
new AudioProfile(AudioTestProfile)
{
filename = "data/audio/test.wav";
description = "AudioTest";
};
function AudioTestA(%volume)
{
echo("AudioTest volume = "@ %volume);
$pref::Audio::masterVolume = %volume;
$AudioTestHandleA = alxCreateSource("AudioTestProfile", expandFilename("data/sound/test.wav"));
echo("AudioTest object = " @ $AudioTestHandleA);
alxPlay($AudioTestHandleA);
}
function AudioTestB(%volume)
{
echo("AudioTest volume = "@ %volume);
alxListenerf(AL_GAIN_LINEAR, %volume);
$pref::Audio::masterVolume = %volume;
alxPlay(AudioTestProfile, 100, 100, 100);
}
i have checked the forums and whatever information i could find and come up empty i am wondering if i am not initilising somthing early on i need to or what is going on My best guess is the audio description and profile is not loading for some reason. Any help would be greatly appreciated
AudioTest volume = 1
AudioTest object = 0
Unable to locate audio profile '0'
AudioTest volume = 0
AudioTest object = 0
Unable to locate audio profile '0'
when i try and run the function AudioTestA
new AudioDescription(AudioTest)
{
volume = 1.0;
isLooping = false;
is3D = false;
type = 0;
};
new AudioProfile(AudioTestProfile)
{
filename = "data/audio/test.wav";
description = "AudioTest";
};
function AudioTestA(%volume)
{
echo("AudioTest volume = "@ %volume);
$pref::Audio::masterVolume = %volume;
$AudioTestHandleA = alxCreateSource("AudioTestProfile", expandFilename("data/sound/test.wav"));
echo("AudioTest object = " @ $AudioTestHandleA);
alxPlay($AudioTestHandleA);
}
function AudioTestB(%volume)
{
echo("AudioTest volume = "@ %volume);
alxListenerf(AL_GAIN_LINEAR, %volume);
$pref::Audio::masterVolume = %volume;
alxPlay(AudioTestProfile, 100, 100, 100);
}
i have checked the forums and whatever information i could find and come up empty i am wondering if i am not initilising somthing early on i need to or what is going on My best guess is the audio description and profile is not loading for some reason. Any help would be greatly appreciated
About the author