Ejemplo n.º 1
0
        internal static void AlcCheckError(IntPtr device, string message = "")
        {
            var error = ALC10.alcGetError(device);

            if (error != ALC10.ALC_NO_ERROR)
            {
                throw new InvalidOperationException(message + $" ({error})");
            }
        }
Ejemplo n.º 2
0
        internal void alcCheckError()
        {
            int error;

            error = ALC10.alcGetError(_device);

            if (error != ALC10.ALC_NO_ERROR)
            {
                throw new InvalidOperationException("ALC error!");
            }
        }
Ejemplo n.º 3
0
        private bool CheckALCError()
        {
            int err = ALC10.alcGetError(alDevice);

            if (err == ALC10.ALC_NO_ERROR)
            {
                return(false);
            }

            FNALoggerEXT.LogError("OpenAL Device Error: " + err.ToString("X4"));
            return(true);
        }
Ejemplo n.º 4
0
        private bool CheckALCError()
        {
            int err = ALC10.alcGetError(alDevice);

            if (err == ALC10.ALC_NO_ERROR)
            {
                return(false);
            }

            System.Console.WriteLine("OpenAL Device Error: {0:X}", err);
            return(true);
        }
Ejemplo n.º 5
0
        private bool CheckALCError(string message)
        {
            bool retVal = false;
            int  err    = ALC10.alcGetError(alDevice);

            if (err != ALC10.ALC_NO_ERROR)
            {
                System.Console.WriteLine("OpenAL Error: " + err.ToString());
                retVal = true;
            }

            return(retVal);
        }
Ejemplo n.º 6
0
        void Check()
        {
            int error = ALC10.alcGetError(_device);

            switch (error)
            {
            case ALC10.ALC_NO_ERROR: return;

            case ALC10.ALC_INVALID_DEVICE: throw new AudioException("a bad device was passed to an OpenAL function");

            case ALC10.ALC_INVALID_CONTEXT: throw new AudioException("a bad context was passed to an OpenAL function");

            case ALC10.ALC_INVALID_ENUM: throw new AudioException("an unknown enum value was passed to an OpenAL function");

            case ALC10.ALC_INVALID_VALUE: throw new AudioException("an invalid value was passed to an OpenAL function");

            case ALC10.ALC_OUT_OF_MEMORY: throw new AudioException("the requested operation resulted in OpenAL running out of memory");
            }
        }
Ejemplo n.º 7
0
 // Simply clears any ALC error without reporting it
 public static void ClearALCError()
 {
     ALC10.alcGetError(AudioEngine.Device);
 }