private void loadAudioOutputs()
 {
     try
     {
         _audioOutputs = new ArrayList();
         IntPtr pOutputs = VLCLibrary.Instance.audio_output_list_get(_instance.Handle);
         if (pOutputs != IntPtr.Zero)
         {
             VLCLibrary.libvlc_audio_output_t output;
             do
             {
                 output = (VLCLibrary.libvlc_audio_output_t)Marshal.PtrToStructure(pOutputs, typeof(VLCLibrary.libvlc_audio_output_t));
                 AudioOutput aOutput      = new AudioOutput(output);
                 int         mdeviceCount = VLCLibrary.Instance.audio_output_device_count(_instance.Handle, output.psz_name);
                 if (mdeviceCount > 0)
                 {
                     for (int k = 0; k < mdeviceCount; k++)
                     {
                         AudioDevice device = new AudioDevice();
                         IntPtr      pId    = VLCLibrary.Instance.audio_output_device_id(_instance.Handle, output.psz_name, k);
                         device.deviceId = Marshal.PtrToStringAnsi(pId);
                         IntPtr pLongName = VLCLibrary.Instance.audio_output_device_longname(_instance.Handle, output.psz_name, k);
                         device.deviceName = Marshal.PtrToStringAnsi(pLongName);
                         aOutput.AddDevice(device);
                     }
                     _audioOutputs.Add(aOutput);
                 }
                 pOutputs = output.p_next;
             } while (output.p_next != IntPtr.Zero);
         }
         VLCLibrary.Instance.audio_output_list_release(pOutputs);
     }
     catch (Exception e)
     {
         Logger.WriteToLog("Error during loading Audio Outputs: " + e.Message);
     }
 }
 public void AddDevice(AudioDevice device)
 {
     _outputDevices.Add(device);
 }