コード例 #1
0
 private AudioOutputModuleInfo GetDeviceInfo(libvlc_audio_output_t pDevice)
 {
     return(new AudioOutputModuleInfo()
     {
         Name = Marshal.PtrToStringAnsi(pDevice.psz_name),
         Description = Marshal.PtrToStringAnsi(pDevice.psz_description)
     });
 }
コード例 #2
0
        /**
         * Get the available audio outputs.
         * <p>
         * Each audio output has zero or more audio devices, each device having it's own unique
         * identifier that can be used on a media player to set the select the required output device.
         *
         * @return collection of audio outputs
         */
        public List <AudioOutput> GetAudioOutputs()
        {
            Logger.Debug("GetAudioOutputs()");
            List <AudioOutput> result          = new List <AudioOutput>();
            IntPtr             audioOutputsPtr = LibVlc.libvlc_audio_output_list_get(instance);
            IntPtr             audioOutputPtr  = audioOutputsPtr;

            while (audioOutputPtr != IntPtr.Zero)
            {
                libvlc_audio_output_t audioOutput = (libvlc_audio_output_t)Marshal.PtrToStructure(audioOutputPtr, typeof(libvlc_audio_output_t));
                string name = NativeString.String(audioOutput.psz_name);
                result.Add(new AudioOutput(name, NativeString.String(audioOutput.psz_description), GetAudioOutputDevices(name)));
                audioOutputPtr = audioOutput.p_next;
            }
            LibVlc.libvlc_audio_output_list_release(audioOutputsPtr);
            return(result);
        }
コード例 #3
0
 public static extern void libvlc_audio_output_list_release(libvlc_audio_output_t list);