internal static void PopulateCaptureDevices()
        {
            // clear microphones
            if (_allMicrophones != null)
            {
                _allMicrophones.Clear();
            }
            else
            {
                _allMicrophones = new List <Microphone>();
            }

            _default = null;

            // default device
            string defaultDevice = Alc.GetString(IntPtr.Zero, AlcGetString.CaptureDefaultDeviceSpecifier);

#if true //DESKTOPGL
            // enumarating capture devices
            IntPtr deviceList = Alc.alGetString(IntPtr.Zero, (int)AlcGetString.CaptureDeviceSpecifier);
            // we need to marshal a string array
            string deviceIdentifier = Marshal.PtrToStringAnsi(deviceList);
            while (!String.IsNullOrEmpty(deviceIdentifier))
            {
                Microphone microphone = new Microphone(deviceIdentifier);
                _allMicrophones.Add(microphone);
                if (deviceIdentifier == defaultDevice)
                {
                    _default = microphone;
                }
                deviceList      += deviceIdentifier.Length + 1;
                deviceIdentifier = Marshal.PtrToStringAnsi(deviceList);
            }
#else
            // Xamarin platforms don't provide an handle to alGetString that allow to marshal string arrays
            // so we're basically only adding the default microphone
            Microphone microphone = new Microphone(defaultDevice);
            _allMicrophones.Add(microphone);
            _default = microphone;
#endif
        }