Beispiel #1
0
        void SetSourceWithSettings(CaptureSettings settings, DeviceEntry source, DeviceEntry audioSource)
        {
            activeSource = source;
            activeAudio  = audioSource;

            captureView.Play(source?.Filter, audioSource?.Filter);
            if (settings.SourceSettings != null &&
                settings.SourceSettings.TryGetValue(source?.Name, out var sourceSettings))
            {
                ApplySettings(sourceSettings, captureView.AudioSettings);
            }
            if (settings.AudioSettings != null &&
                settings.AudioSettings.TryGetValue(audioSource?.Name, out var audioSettings))
            {
                ApplySettings(captureView.SourceSettings, audioSettings);
            }

            if (activeSource != null)
            {
                Program.State.SetSourceDevice(activeSource.Name);
            }
            if (activeAudio != null)
            {
                Program.State.SetAudioDevice(activeAudio.Name);
            }
            Program.State.SaveSettings();
        }
 private void ShowPropertyPage(DeviceEntry device)
 {
     if (device != null && device.Filter != null)
     {
         FilterGraphTools.ShowFilterPropertyPage(device.Filter, Handle);
     }
 }