/// <summary> /// デバイス情報を列挙する /// </summary> /// <returns></returns> public static List <AsioDeviceInfo> EnumerateDevices() => ThreadManager.DeviceDispatcher.Invoke(() => { return(AsioDriver.GetAsioDriverNames() .Select(d => new AsioDeviceInfo(d)) .ToList()); });
void GetAsioDriverList() { string[] asioDriverList = AsioDriver.GetAsioDriverNames(); foreach (string asioName in asioDriverList) { comboBox1.Items.Add(asioName); } }
private void MainApp_Load(object sender, EventArgs e) { timer2.Stop(); timer1.Stop(); this.Hide(); loadApp = new LoadApp(); loadApp.Show(); mixer = new Mixer(); plugins = new Plugins(); PluginsList.Controls.Add(plugins); BPM = 128; plugins.Dock = DockStyle.Fill; if (RMVN_Studio.Properties.Settings.Default.ASIODriverName == string.Empty) { string[] asioList = AsioDriver.GetAsioDriverNames(); RMVN_Studio.Properties.Settings.Default.ASIODriverName = asioList[0]; RMVN_Studio.Properties.Settings.Default.AsioDriverIndex = 0; } BackupColor = CloseBtn.BackColor; minImg = new Bitmap(RMVN_Studio.Properties.Resources.Min2); maxImg = new Bitmap(RMVN_Studio.Properties.Resources.max); OnImg = new Bitmap(RMVN_Studio.Properties.Resources.On); OffImg = new Bitmap(RMVN_Studio.Properties.Resources.off); this.Location = Screen.AllScreens[0].WorkingArea.Location; Process thisApp = Process.GetCurrentProcess(); cpuCounter = new PerformanceCounter("Process", "% Processor Time", thisApp.ProcessName, true); settingForm = new Setting(); var lines = File.ReadAllLines(@".\Config\listPath.txt"); if (lines != null) { foreach (string line in lines) { LoadDirectory(line); } } var lines1 = File.ReadAllLines(@".\Config\listPathVST.txt"); if (lines1 != null) { foreach (string line in lines1) { SearchPlugin64bit(line); } } fileBefore = this.FileToBytes(@".\Config\listPath.txt"); fileBefore1 = this.FileToBytes(@".\Config\listPathVST.txt"); loadApp.Hide(); this.Show(); timer1.Start(); timer2.Start(); }
private void refresh_sources() { String[] sources = AsioDriver.GetAsioDriverNames(); sourceList.Items.Clear(); var activateDeviceCount = 0; for (int i = 0; i < sources.Length; i++) { var item = new ListViewItem(sources[i]); try { var driverCapability = (new MyAsioDriverExt(MyAsioDriver.GetAsioDriverByName(sources[i]))).Capabilities; item.SubItems.Add(new ListViewItem.ListViewSubItem(item, driverCapability.NbInputChannels.ToString())); item.SubItems.Add(new ListViewItem.ListViewSubItem(item, driverCapability.NbOutputChannels.ToString())); } catch (Exception ex) { //ignore the exception and try the next source continue; } activateDeviceCount += 1; sourceList.Items.Add(item); } if (sourceList.Items.Count > 0) { //always select the first device as default var deviceName = sourceList.Items[0].Name.ToString(); foreach (ListViewItem item in sourceList.Items) { item.Selected = item.Name.ToString() == deviceName; } sourceList.Items[0].Selected = true; } if (activateDeviceCount == 0) { MessageBox.Show("Device not found, please insert a device.", "Error"); } }
/// <summary> /// Gets the names of the installed ASIO Driver. /// </summary> /// <returns>an array of driver names</returns> public static string[] GetDriverNames() { return(AsioDriver.GetAsioDriverNames()); }