Ejemplo n.º 1
0
        public static AudioProvider Create(AudioDevice device)
        {
            if (AvailableTypes.HasFlag(AudioProviderType.DirectSound))
            {
                switch (Environment.OSVersion.Platform)
                {
                case PlatformID.Win32NT:
                    if (IntPtr.Size <= 4)
                    {
                        return(new wAudioProvider(device));
                    }
                    break;
                }
            }

            if (device == null && AvailableTypes.HasFlag(AudioProviderType.OpenAL))
            {
                try
                {
                    return(new alAudioProvider());
                }
                catch (TypeInitializationException) { }
            }

            return(null);
        }
        public static AudioProvider Create(AudioDevice device)
        {
            if (AvailableTypes.HasFlag(AudioProviderType.DirectSound))
            {
                switch (Environment.OSVersion.Platform)
                {
                case PlatformID.Win32NT:
                    if (IntPtr.Size <= 4)
                    {
                        return(new wAudioProvider(device));
                    }
                    break;
                }
            }

            return(null);
        }