internal static void checkAlError() { int error = AlNative.alGetError(); if (error != AlNative.AL_NO_ERROR) { string formatErrMsg = string.Format("OpenAL Error: {0} - {1}", Marshal.PtrToStringAuto(AlNative.alGetString(error)), AlNative.alcGetCurrentContext().ToString()); throw new SharpAudioException(formatErrMsg); } }