Наследование: IAudioDevice
Пример #1
0
        internal static void ErrorCheck(Device device)
        {
            int error = alcGetError (device.Handle);
            switch ((ALCError)error)
            {
                case ALCError.ALC_NO_ERROR:
                    return;

                case ALCError.ALC_INVALID_ENUM:
                    throw new ArgumentException ("Invalid enum");

                case ALCError.ALC_INVALID_VALUE:
                    throw new ArgumentException ("Invalid value");

                case ALCError.ALC_INVALID_CONTEXT:
                    throw new ArgumentException ("Invalid context");

                case ALCError.ALC_INVALID_DEVICE:
                    throw new ArgumentException ("Invalid device");

                case ALCError.ALC_OUT_OF_MEMORY:
                    throw new OutOfMemoryException ("OpenAL (ALC) out of memory.");
            }
        }
Пример #2
0
        internal static bool GetIsExtensionPresent(Device device, string extension)
        {
            sbyte result;
            if (extension.StartsWith ("ALC"))
            {
                result = alcIsExtensionPresent (device.Handle, extension);
                OpenAL.ErrorCheck (device);
            }
            else
            {
                result = alIsExtensionPresent (extension);
                OpenAL.ErrorCheck ();
            }

            return (result == 1);
        }
Пример #3
0
 protected bool Equals(Device other)
 {
     return string.Equals (Name, other.Name);
 }