Esempio n. 1
0
 protected override void OnRefresh()
 {
     for (int i = 0; i < WaveIn.DeviceCount; ++i)
     {
         AvailableRecordingSources.Add(new NAudioItem(i, WaveIn.GetCapabilities(i).ProductName));
     }
 }
Esempio n. 2
0
        public void Refresh()
        {
            AvailableRecordingSources.Clear();
            AvailableLoopbackSources.Clear();

            AvailableRecordingSources.Add(NoSoundItem.Instance);
            AvailableLoopbackSources.Add(NoSoundItem.Instance);

            OnRefresh();

            SelectedRecordingSource = SelectedLoopbackSource = NoSoundItem.Instance;
        }
Esempio n. 3
0
 protected override void OnRefresh()
 {
     for (int i = 0; Bass.RecordGetDeviceInfo(i, out var info); ++i)
     {
         if (info.IsLoopback)
         {
             AvailableLoopbackSources.Add(new BassItem(i, info.Name));
         }
         else
         {
             AvailableRecordingSources.Add(new BassItem(i, info.Name));
         }
     }
 }
Esempio n. 4
0
        protected override void OnRefresh()
        {
            var infos = new ArrayList();

            for (int i = 0; Bass.RecordGetDeviceInfo(i, out var info); ++i)
            {
                var bassItem = new BassItem(i, info.Name);
                if (info.IsLoopback)
                {
                    AvailableLoopbackSources.Add(bassItem);
                    if ("Speakers".Equals(info.Type.ToString()))
                    {
                        this.SelectedLoopbackSource = bassItem;
                    }
                }
                else
                {
                    AvailableRecordingSources.Add(bassItem);
                    this.SelectedRecordingSource = bassItem;
                }
            }
        }
Esempio n. 5
0
        public void RefreshAudioSources()
        {
            AvailableRecordingSources.Clear();
            AvailableLoopbackSources.Clear();

            AvailableRecordingSources.Add(new KeyValuePair <int?, string>(null, "[No Sound]"));
            AvailableLoopbackSources.Add(new KeyValuePair <int?, string>(null, "[No Sound]"));

            DeviceInfo info;

            for (int i = 0; Bass.RecordGetDeviceInfo(i, out info); ++i)
            {
                if (info.IsLoopback)
                {
                    AvailableLoopbackSources.Add(new KeyValuePair <int?, string>(i, info.Name));
                }
                else
                {
                    AvailableRecordingSources.Add(new KeyValuePair <int?, string>(i, info.Name));
                }
            }

            SelectedRecordingSource = SelectedLoopbackSource = null;
        }