how to handle OpenALDotNet Exceptions?

simonlucas 101 Aug 06, 2012 at 16:03

I have a legacy 3D game written in Ogre and am trying to fix a series of exceptions in OpenALDotNet. There are two variations, one of which appears to run constantly after a while and one of which causes the program to hang. Ideally, I’d like to do whatever is needed to get rid of the exceptions OR find a way to safely ignore them.

I am Ogre/C# naive. Thanks for looking.

Error 1 trace from DOS console happens after a number of sounds have been played and then keeps happening until the player is reset:

OpenALDotNet.OpenAlException: Invalid Name
at OpenALDotNet.AudioSource.set_Gain(Single value)

Error 2:
The fatal error occurs on CheckAL:

public class OpenAlException : Exception

public static void CheckAl(int errorcode)
if (errorcode != Al.AL_NO_ERROR)
throw new OpenAlException(Al.alGetString(errorcode));// occurs here

Error Trace from Visual STudio:

OpenALDotNet.OpenAlException was unhandled
Message=”Invalid Name”
at OpenALDotNet.OpenAlException.CheckAl(Int32 errorcode)
at OpenALDotNet.OpenAlException.CheckAl()
at OpenALDotNet.AudioSource.get_BuffersProcessed()
at OpenALDotNet.Streams.AudioStreamPlayer.Update()
at obj) in C:\Users\User\Desktop\Racing\Racing\2012.06.11-SOS-Redux-Release-9openAL\ScienceOf-Driving\audio\SoundController.cs:line 38
at System.Threading.ThreadHelper.ThreadStart_Context(Object state)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
at System.Threading.ThreadHelper.ThreadStart(Object obj)

0 Replies

Please log in or register to post a reply.

No replies have been made yet.