static void Main(string[] args) { /// Видео https://youtu.be/6mJXV9m_cmQ Computer iMac = new Computer(); SoundCard apollo = new SoundCard(); Thunderbolt2Cable tb2Cable = new Thunderbolt2Cable(); apollo.Thunderbolt2 = tb2Cable.In; // iMac.Thunderbolt3 = tb2Cable.Out; // Ошибка. Несоответствие интерфейсов Thunderbolt2PortToThunderbolt3Port tb2toTb3Cable = new Thunderbolt2PortToThunderbolt3Port(); tb2toTb3Cable.Thunderbolt2 = tb2Cable.Out; iMac.Thunderbolt3 = tb2toTb3Cable.Thunderbolt3; apollo.Thunderbolt2.Data.Signal = "++++"; Console.WriteLine($"apollo.Signal: {apollo.Thunderbolt2.Data.Signal}"); Console.WriteLine($"iMac.Signal: {iMac.Thunderbolt3.Data.Signal}"); iMac.Thunderbolt3.Data.Signal = "----"; Console.WriteLine($"iMac.Signal: {iMac.Thunderbolt3.Data.Signal}"); Console.WriteLine($"apollo.Signal: {apollo.Thunderbolt2.Data.Signal}"); }
private void PlayMovie() { HardDisk.ProvideMovieData(); Cpu.Handle(); SoundCard.Show(); GraphicsCard.Play(); }
public async Task <IActionResult> Edit(int id, [Bind("Id,Name,Price")] SoundCard soundCard) { if (id != soundCard.Id) { return(NotFound()); } if (ModelState.IsValid) { try { _context.Update(soundCard); await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!SoundCardExists(soundCard.Id)) { return(NotFound()); } else { throw; } } return(RedirectToAction(nameof(Index))); } return(View(soundCard)); }
static async Task UpdateGarysWorkingComputer() { using var db = new MyDbContext(); var source = new Source { Name = "Tom" }; db.Sources.Add(source); var transaction = new Transaction { Source = source, SysTime = DateTime.UtcNow, User = "******" }; using var dbTransaction = await db.BeginTransactionAsync(transaction); var processor = new Processor { Name = "AMD A8-7680 OEM" }; var motherBoard = new MotherBoard { Name = "ASRock FM2A68M-HD+" }; var videoCard = new VideoCard { Name = "MSI AMD Radeon R7 240 LP [R7 240 2GD3 64bit LP]" }; var ram1 = new RAM { Name = "Kingston ValueRAM [KVR16N11S8/4]" }; var ram2 = new RAM { Name = "Kingston ValueRAM [KVR16N11S8/4]" }; var soundCard = new SoundCard { Name = "ORICO SC2-BK" }; db.Processors.Add(processor); db.MotherBoards.Add(motherBoard); db.VideoCards.Add(videoCard); db.RAMs.Add(ram1); db.RAMs.Add(ram2); db.SoundCards.Add(soundCard); await db.SaveChangesAsync(); var workComputer = (await db.Users.Include(a => a.WorkComputer).FirstAsync(a => a.Name == GaryName)).WorkComputer; workComputer.Processor = processor; workComputer.MotherBoard = motherBoard; workComputer.VideoCard = videoCard; workComputer.RAM1 = ram1; workComputer.RAM2 = ram2; workComputer.SoundCard = soundCard; await db.SaveChangesAsync(); dbTransaction.Commit(); }
public AdapterSoundCardToComputer() { soundCard = new SoundCard(); thunderbolt3 = new Thunderbolt3Port() { Data = new DataThunderbolt() }; }
public async Task <IActionResult> Create([Bind("Id,Name,Price")] SoundCard soundCard) { if (ModelState.IsValid) { _context.Add(soundCard); await _context.SaveChangesAsync(); return(RedirectToAction(nameof(Index))); } return(View(soundCard)); }
static void Main(string[] args) { //// Было //Computer iMac = new Computer(); //SoundCard apollo = new SoundCard(); //Thunderbolt2Cable tb2Cable = new Thunderbolt2Cable(); //apollo.Thunderbolt2 = tb2Cable.In; //// iMac.Thunderbolt3 = tb2Cable.Out; // Ошибка. Несоответствие интерфейсов ////Thunderbolt2PortToThunderbolt3Port tb2toTb3Cable = new Thunderbolt2PortToThunderbolt3Port(); ////tb2toTb3Cable.Thunderbolt2 = tb2Cable.Out; ////iMac.Thunderbolt3 = tb2toTb3Cable.Thunderbolt3; //// Стало v 1.1 //Computer iMac = new Computer(); //AdapterSoundCardToComputer apolloX = new AdapterSoundCardToComputer(); //Thunderbolt3Cable tb3Cable = new Thunderbolt3Cable(); //apolloX.Thunderbolt3 = tb3Cable.In; //iMac.Thunderbolt3 = tb3Cable.Out; // Ошибки нет. Интерфейсы подходят //apolloX.Thunderbolt3.Data.Signal = "++++"; //Console.WriteLine($"apolloX.Signal: {apolloX.Thunderbolt3.Data.Signal}"); //Console.WriteLine($"iMac.Signal: {iMac.Thunderbolt3.Data.Signal}"); //iMac.Thunderbolt3.Data.Signal = "----"; //Console.WriteLine($"iMac.Signal: {iMac.Thunderbolt3.Data.Signal}"); //Console.WriteLine($"apolloX.Signal: {apolloX.Thunderbolt3.Data.Signal}"); // Стало v 1.2 SoundCard apollo = new SoundCard(); AdapterComputerToSoundCard iMacPro = new AdapterComputerToSoundCard(); Thunderbolt2Cable tb2Cable = new Thunderbolt2Cable(); apollo.Thunderbolt2 = tb2Cable.In; iMacPro.Thunderbolt2 = tb2Cable.Out; // Ошибки нет. Интерфейсы подходят apollo.Thunderbolt2.Data.Signal = "++++"; Console.WriteLine($"apolloX.Signal: {apollo.Thunderbolt2.Data.Signal}"); Console.WriteLine($"iMac.Signal: {iMacPro.Thunderbolt2.Data.Signal}"); iMacPro.Thunderbolt2.Data.Signal = "----"; Console.WriteLine($"iMac.Signal: {iMacPro.Thunderbolt2.Data.Signal}"); Console.WriteLine($"apolloX.Signal: {apollo.Thunderbolt2.Data.Signal}"); }
public List <SoundCard> GetSoundCards(IIdoit idoit) { IdoitEnumerator manufacEnum = idoit.Dialog(new SoundCard().Constant, "manufacturer"); List <SoundCard> result = new List <SoundCard>(); try { ManagementObjectSearcher searcher = new ManagementObjectSearcher("root\\CIMV2", "SELECT * FROM Win32_SoundDevice"); foreach (ManagementObject queryObj in searcher.Get()) { SoundCard child = new SoundCard(); //Wert für Hersteller herausfinden. string manufacQuery = (string)queryObj["Manufacturer"]; if (!string.IsNullOrEmpty(manufacQuery)) { if (!manufacEnum.TestTitle(manufacQuery)) { //Hersteller hinzufügen, falls noch nicht bekannt... idoit.DialogEdit(new SoundCard(), "manufacturer", manufacQuery); manufacEnum = idoit.Dialog(new SoundCard().Constant, "manufacturer"); } child.manufacturer = manufacEnum.FindTitleLike(manufacQuery); } child.title = (string)queryObj["Caption"]; child.description = (string)queryObj["Description"]; result.Add(child); } } catch (Exception e) { throw; } return(result); }
private void btnFinished_Click(object sender, System.EventArgs e) { if (sound_card_index >= 0) { SoundCard card = SoundCard.FIRST; switch (comboBox3.Text) { case "M-Audio Delta 44 (PCI)": card = SoundCard.DELTA_44; break; case "PreSonus FireBox (FireWire)": card = SoundCard.FIREBOX; break; case "Edirol FA-66 (FireWire)": card = SoundCard.EDIROL_FA_66; break; case "SB Audigy (PCI)": card = SoundCard.AUDIGY; break; case "SB Audigy 2 (PCI)": card = SoundCard.AUDIGY_2; break; case "SB Audigy 2 ZS (PCI)": card = SoundCard.AUDIGY_2_ZS; break; case "Sound Blaster Extigy (USB)": card = SoundCard.EXTIGY; break; case "Sound Blaster MP3+ (USB)": card = SoundCard.MP3_PLUS; break; case "Turtle Beach Santa Cruz (PCI)": card = SoundCard.SANTA_CRUZ; break; case "No Mixer Audio Card": card = SoundCard.NO_MIXER_AUDIO_CARD; break; case "Realtek HD audio": card = SoundCard.REALTEK_HD_AUDIO; break; case "Unsupported Card": card = SoundCard.UNSUPPORTED_CARD; break; } console.CurrentSoundCard = card; } console.SetupForm.CurrentModel = model; if (Si570_present) { console.SetupForm.chkGeneralUSBPresent.Checked = true; } else { console.SetupForm.chkGeneralUSBPresent.Checked = false; } console.run_setup_wizard = false; this.Close(); }
private void comboAudioSoundCard_SelectedIndexChanged(object sender, System.EventArgs e) { if(comboAudioSoundCard.SelectedIndex < 0) return; bool on = console.PowerOn; if(on) { console.PowerOn = false; Thread.Sleep(100); } SoundCard card = SoundCard.FIRST; switch(comboAudioSoundCard.Text) { case "M-Audio Delta 44 (PCI)": card = SoundCard.DELTA_44; break; case "PreSonus FireBox (FireWire)": card = SoundCard.FIREBOX; break; case "Edirol FA-66 (FireWire)": card = SoundCard.EDIROL_FA_66; break; case "SB Audigy (PCI)": card = SoundCard.AUDIGY; break; case "SB Audigy 2 (PCI)": card = SoundCard.AUDIGY_2; break; case "SB Audigy 2 ZS (PCI)": card = SoundCard.AUDIGY_2_ZS; break; case "Sound Blaster Extigy (USB)": card = SoundCard.EXTIGY; break; case "Sound Blaster MP3+ (USB)": card = SoundCard.MP3_PLUS; break; case "Turtle Beach Santa Cruz (PCI)": card = SoundCard.SANTA_CRUZ; break; case "Unsupported Card": card = SoundCard.UNSUPPORTED_CARD; break; } if(card == SoundCard.FIRST) return; console.CurrentSoundCard = card; current_sound_card = card; switch(card) { case SoundCard.SANTA_CRUZ: grpAudioDetails1.Enabled = false; grpAudioVolts1.Visible = chkAudioExpert.Checked; udAudioVoltage1.Value = 1.274M; if(comboAudioSampleRate1.Items.Contains(96000)) comboAudioSampleRate1.Items.Remove(96000); if(comboAudioSampleRate1.Items.Contains(192000)) comboAudioSampleRate1.Items.Remove(192000); comboAudioSampleRate1.Text = "48000"; foreach(PADeviceInfo p in comboAudioDriver1.Items) { if(p.Name == "ASIO") { comboAudioDriver1.SelectedItem = p; break; } } foreach(PADeviceInfo dev in comboAudioInput1.Items) { if(dev.Name == "Wuschel's ASIO4ALL") { comboAudioInput1.Text = "Wuschel's ASIO4ALL"; comboAudioOutput1.Text = "Wuschel's ASIO4ALL"; } } if(comboAudioInput1.Text != "Wuschel's ASIO4ALL") { foreach(PADeviceInfo dev in comboAudioInput1.Items) { if(dev.Name == "ASIO4ALL v2") { comboAudioInput1.Text = "ASIO4ALL v2"; comboAudioOutput1.Text = "ASIO4ALL v2"; } } } comboAudioMixer1.Text = "Santa Cruz(tm)"; comboAudioReceive1.Text = "Line In"; for(int i=0; i<comboAudioTransmit1.Items.Count; i++) { if(((string)comboAudioTransmit1.Items[i]).StartsWith("Mi")) { comboAudioTransmit1.SelectedIndex = i; break; } } if(comboAudioMixer1.SelectedIndex < 0 || comboAudioMixer1.Text != "Santa Cruz(tm)") { MessageBox.Show(comboAudioSoundCard.Text+" not found.\n "+ "Please verify that this specific sound card is installed " + "and functioning and try again. \nIf your sound card is not " + "a "+comboAudioSoundCard.Text+" and your card is not in the "+ "list, use the Unsupported Card selection. \nFor more support, "+ "email [email protected].", comboAudioSoundCard.Text+" Not Found", MessageBoxButtons.OK, MessageBoxIcon.Exclamation); console.PowerEnabled = false; } else if(!Mixer.InitSantaCruz(console.MixerID1)) { MessageBox.Show("The "+comboAudioSoundCard.Text+" mixer initialization "+ "failed. Please install the latest drivers from www.turtlebeach.com " + " and try again. For more support, email [email protected].", comboAudioSoundCard.Text+" Mixer Initialization Failed", MessageBoxButtons.OK, MessageBoxIcon.Exclamation); console.PowerEnabled = false; } else if(comboAudioInput1.Text != "ASIO4ALL v2" && comboAudioInput1.Text != "Wuschel's ASIO4ALL") { MessageBox.Show("ASIO4ALL driver not found. Please visit " + "www.asio4all.com, download and install the driver, "+ "and try again. Alternatively, you can use the Unsupported "+ "Card selection and setup the sound interface manually. For "+ "more support, email [email protected].", "ASIO4ALL Not Found", MessageBoxButtons.OK, MessageBoxIcon.Exclamation); console.PowerEnabled = false; } else { udAudioLineIn1.Value = 20; console.PowerEnabled = true; grpAudioMicInGain1.Enabled = true; grpAudioLineInGain1.Enabled = true; comboAudioChannels1.Text = "2"; comboAudioChannels1.Enabled = false; Audio.IN_RX1_L = 0; Audio.IN_RX1_R = 1; Audio.IN_TX_L = 0; Audio.IN_TX_R = 1; } break; case SoundCard.AUDIGY: case SoundCard.AUDIGY_2: grpAudioDetails1.Enabled = false; grpAudioVolts1.Visible = chkAudioExpert.Checked; udAudioVoltage1.Value = 2.23M; if(comboAudioSampleRate1.Items.Contains(96000)) comboAudioSampleRate1.Items.Remove(96000); if(comboAudioSampleRate1.Items.Contains(192000)) comboAudioSampleRate1.Items.Remove(192000); comboAudioSampleRate1.Text = "48000"; foreach(PADeviceInfo p in comboAudioDriver1.Items) { if(p.Name == "ASIO") { comboAudioDriver1.SelectedItem = p; break; } } foreach(PADeviceInfo dev in comboAudioInput1.Items) { if(dev.Name == "Wuschel's ASIO4ALL") { comboAudioInput1.Text = "Wuschel's ASIO4ALL"; comboAudioOutput1.Text = "Wuschel's ASIO4ALL"; } } if(comboAudioInput1.Text != "Wuschel's ASIO4ALL") { foreach(PADeviceInfo dev in comboAudioInput1.Items) { if(dev.Name == "ASIO4ALL v2") { comboAudioInput1.Text = "ASIO4ALL v2"; comboAudioOutput1.Text = "ASIO4ALL v2"; } } } for(int i=0; i<comboAudioMixer1.Items.Count; i++) { if(((string)comboAudioMixer1.Items[i]).StartsWith("SB Audigy")) { comboAudioMixer1.SelectedIndex = i; break; } } for(int i=0; i<comboAudioReceive1.Items.Count; i++) { if(((string)comboAudioReceive1.Items[i]).StartsWith("Analog")) { comboAudioReceive1.SelectedIndex = i; break; } } if(comboAudioReceive1.SelectedIndex < 0 || !comboAudioReceive1.Text.StartsWith("Analog")) { for(int i=0; i<comboAudioReceive1.Items.Count; i++) { if(((string)comboAudioReceive1.Items[i]).StartsWith("Mix ana")) { comboAudioReceive1.SelectedIndex = i; break; } } } for(int i=0; i<comboAudioTransmit1.Items.Count; i++) { if(((string)comboAudioTransmit1.Items[i]).StartsWith("Mi")) { comboAudioTransmit1.SelectedIndex = i; break; } } if(comboAudioMixer1.SelectedIndex < 0 || !comboAudioMixer1.Text.StartsWith("SB Audigy")) { MessageBox.Show(comboAudioSoundCard.Text+" not found.\n "+ "Please verify that this specific sound card is installed " + "and functioning and try again. \nIf your sound card is not " + "a "+comboAudioSoundCard.Text+" and your card is not in the "+ "list, use the Unsupported Card selection. \nFor more support, "+ "email [email protected].", comboAudioSoundCard.Text+" Not Found", MessageBoxButtons.OK, MessageBoxIcon.Exclamation); console.PowerEnabled = false; } else if(!Mixer.InitAudigy2(console.MixerID1)) { MessageBox.Show("The "+comboAudioSoundCard.Text+" mixer initialization "+ "failed. Please install the latest drivers from www.creativelabs.com " + " and try again. For more support, email [email protected].", comboAudioSoundCard.Text+" Mixer Initialization Failed", MessageBoxButtons.OK, MessageBoxIcon.Exclamation); console.PowerEnabled = false; } else if(comboAudioInput1.Text != "ASIO4ALL v2" && comboAudioInput1.Text != "Wuschel's ASIO4ALL") { MessageBox.Show("ASIO4ALL driver not found. Please visit " + "www.asio4all.com, download and install the driver, "+ "and try again. Alternatively, you can use the Unsupported "+ "Card selection and setup the sound interface manually. For "+ "more support, email [email protected].", "ASIO4ALL Not Found", MessageBoxButtons.OK, MessageBoxIcon.Exclamation); console.PowerEnabled = false; } else { udAudioLineIn1.Value = 1; console.PowerEnabled = true; grpAudioMicInGain1.Enabled = true; grpAudioLineInGain1.Enabled = true; comboAudioChannels1.Text = "2"; comboAudioChannels1.Enabled = false; Audio.IN_RX1_L = 0; Audio.IN_RX1_R = 1; Audio.IN_TX_L = 0; Audio.IN_TX_R = 1; } break; case SoundCard.AUDIGY_2_ZS: grpAudioDetails1.Enabled = false; grpAudioVolts1.Visible = chkAudioExpert.Checked; udAudioVoltage1.Value = 2.23M; if(comboAudioSampleRate1.Items.Contains(96000)) comboAudioSampleRate1.Items.Remove(96000); if(comboAudioSampleRate1.Items.Contains(192000)) comboAudioSampleRate1.Items.Remove(192000); comboAudioSampleRate1.Text = "48000"; foreach(PADeviceInfo p in comboAudioDriver1.Items) { if(p.Name == "ASIO") { comboAudioDriver1.SelectedItem = p; break; } } foreach(PADeviceInfo dev in comboAudioInput1.Items) { if(dev.Name == "Wuschel's ASIO4ALL") { comboAudioInput1.Text = "Wuschel's ASIO4ALL"; comboAudioOutput1.Text = "Wuschel's ASIO4ALL"; } } if(comboAudioInput1.Text != "Wuschel's ASIO4ALL") { foreach(PADeviceInfo dev in comboAudioInput1.Items) { if(dev.Name == "ASIO4ALL v2") { comboAudioInput1.Text = "ASIO4ALL v2"; comboAudioOutput1.Text = "ASIO4ALL v2"; } } } for(int i=0; i<comboAudioMixer1.Items.Count; i++) { if(((string)comboAudioMixer1.Items[i]).StartsWith("SB Audigy")) { comboAudioMixer1.SelectedIndex = i; break; } } for(int i=0; i<comboAudioReceive1.Items.Count; i++) { if(((string)comboAudioReceive1.Items[i]).StartsWith("Analog")) { comboAudioReceive1.SelectedIndex = i; break; } } if(comboAudioReceive1.SelectedIndex < 0 || !comboAudioReceive1.Text.StartsWith("Analog")) { for(int i=0; i<comboAudioReceive1.Items.Count; i++) { if(((string)comboAudioReceive1.Items[i]).StartsWith("Mix ana")) { comboAudioReceive1.SelectedIndex = i; break; } } } for(int i=0; i<comboAudioTransmit1.Items.Count; i++) { if(((string)comboAudioTransmit1.Items[i]).StartsWith("Mi")) { comboAudioTransmit1.SelectedIndex = i; break; } } if(comboAudioMixer1.SelectedIndex < 0 || !comboAudioMixer1.Text.StartsWith("SB Audigy")) { MessageBox.Show(comboAudioSoundCard.Text+" not found.\n "+ "Please verify that this specific sound card is installed " + "and functioning and try again. \nIf your sound card is not " + "a "+comboAudioSoundCard.Text+" and your card is not in the "+ "list, use the Unsupported Card selection. \nFor more support, "+ "email [email protected].", comboAudioSoundCard.Text+" Not Found", MessageBoxButtons.OK, MessageBoxIcon.Exclamation); console.PowerEnabled = false; } else if(!Mixer.InitAudigy2ZS(console.MixerID1)) { MessageBox.Show("The "+comboAudioSoundCard.Text+" mixer initialization "+ "failed. Please install the latest drivers from www.creativelabs.com " + " and try again. For more support, email [email protected].", comboAudioSoundCard.Text+" Mixer Initialization Failed", MessageBoxButtons.OK, MessageBoxIcon.Exclamation); console.PowerEnabled = false; } else if(comboAudioInput1.Text != "ASIO4ALL v2" && comboAudioInput1.Text != "Wuschel's ASIO4ALL") { MessageBox.Show("ASIO4ALL driver not found. Please visit " + "www.asio4all.com, download and install the driver, "+ "and try again. Alternatively, you can use the Unsupported "+ "Card selection and setup the sound interface manually. For "+ "more support, email [email protected].", "ASIO4ALL Not Found", MessageBoxButtons.OK, MessageBoxIcon.Exclamation); console.PowerEnabled = false; } else { udAudioLineIn1.Value = 1; console.PowerEnabled = true; grpAudioMicInGain1.Enabled = true; grpAudioLineInGain1.Enabled = true; comboAudioChannels1.Text = "2"; comboAudioChannels1.Enabled = false; Audio.IN_RX1_L = 0; Audio.IN_RX1_R = 1; Audio.IN_TX_L = 0; Audio.IN_TX_R = 1; } break; case SoundCard.EXTIGY: grpAudioDetails1.Enabled = false; grpAudioVolts1.Visible = chkAudioExpert.Checked; udAudioVoltage1.Value = 1.96M; if(!comboAudioSampleRate1.Items.Contains(96000)) comboAudioSampleRate1.Items.Add(96000); if(comboAudioSampleRate1.Items.Contains(192000)) comboAudioSampleRate1.Items.Remove(192000); comboAudioSampleRate1.Text = "48000"; foreach(PADeviceInfo p in comboAudioDriver1.Items) { if(p.Name == "ASIO") { comboAudioDriver1.SelectedItem = p; break; } } foreach(PADeviceInfo dev in comboAudioInput1.Items) { if(dev.Name == "Wuschel's ASIO4ALL") { comboAudioInput1.Text = "Wuschel's ASIO4ALL"; comboAudioOutput1.Text = "Wuschel's ASIO4ALL"; } } if(comboAudioInput1.Text != "Wuschel's ASIO4ALL") { foreach(PADeviceInfo dev in comboAudioInput1.Items) { if(dev.Name == "ASIO4ALL v2") { comboAudioInput1.Text = "ASIO4ALL v2"; comboAudioOutput1.Text = "ASIO4ALL v2"; } } } for(int i=0; i<comboAudioMixer1.Items.Count; i++) { if(((string)comboAudioMixer1.Items[i]).StartsWith("Creative SB Extigy")) { comboAudioMixer1.SelectedIndex = i; break; } } comboAudioReceive1.Text = "Line In"; comboAudioTransmit1.Text = "Microphone"; if(comboAudioMixer1.SelectedIndex < 0 || comboAudioMixer1.Text != "Creative SB Extigy") { MessageBox.Show(comboAudioSoundCard.Text+" not found.\n "+ "Please verify that this specific sound card is installed " + "and functioning and try again. \nIf your sound card is not " + "a "+comboAudioSoundCard.Text+" and your card is not in the "+ "list, use the Unsupported Card selection. \nFor more support, "+ "email [email protected].", comboAudioSoundCard.Text+" Not Found", MessageBoxButtons.OK, MessageBoxIcon.Exclamation); console.PowerEnabled = false; } else if(!Mixer.InitExtigy(console.MixerID1)) { MessageBox.Show("The "+comboAudioSoundCard.Text+" mixer initialization "+ "failed. Please install the latest drivers from www.creativelabs.com " + " and try again. For more support, email [email protected].", comboAudioSoundCard.Text+" Mixer Initialization Failed", MessageBoxButtons.OK, MessageBoxIcon.Exclamation); console.PowerEnabled = false; } else if(comboAudioInput1.Text != "ASIO4ALL v2" && comboAudioInput1.Text != "Wuschel's ASIO4ALL") { MessageBox.Show("ASIO4ALL driver not found. Please visit " + "www.asio4all.com, download and install the driver, "+ "and try again. Alternatively, you can use the Unsupported "+ "Card selection and setup the sound interface manually. For "+ "more support, email [email protected].", "ASIO4ALL Not Found", MessageBoxButtons.OK, MessageBoxIcon.Exclamation); console.PowerEnabled = false; } else { udAudioLineIn1.Value = 20; console.PowerEnabled = true; grpAudioMicInGain1.Enabled = true; grpAudioLineInGain1.Enabled = true; comboAudioChannels1.Text = "2"; comboAudioChannels1.Enabled = false; Audio.IN_RX1_L = 0; Audio.IN_RX1_R = 1; Audio.IN_TX_L = 0; Audio.IN_TX_R = 1; } break; case SoundCard.MP3_PLUS: grpAudioDetails1.Enabled = false; grpAudioVolts1.Visible = chkAudioExpert.Checked; udAudioVoltage1.Value = 0.982M; if(comboAudioSampleRate1.Items.Contains(96000)) comboAudioSampleRate1.Items.Remove(96000); if(comboAudioSampleRate1.Items.Contains(192000)) comboAudioSampleRate1.Items.Remove(192000); comboAudioSampleRate1.Text = "48000"; foreach(PADeviceInfo p in comboAudioDriver1.Items) { if(p.Name == "ASIO") { comboAudioDriver1.SelectedItem = p; break; } } for(int i=0; i<comboAudioMixer1.Items.Count; i++) { if(((string)comboAudioMixer1.Items[i]).StartsWith("Sound Blaster")) { comboAudioMixer1.SelectedIndex = i; break; } } if(comboAudioMixer1.SelectedIndex < 0 || (string)comboAudioMixer1.SelectedItem != "Sound Blaster") { for(int i=0; i<comboAudioMixer1.Items.Count; i++) { if(((string)comboAudioMixer1.Items[i]).StartsWith("USB Audio")) { comboAudioMixer1.SelectedIndex = i; break; } } } foreach(PADeviceInfo dev in comboAudioInput1.Items) { if(dev.Name == "Wuschel's ASIO4ALL") { comboAudioInput1.Text = "Wuschel's ASIO4ALL"; comboAudioOutput1.Text = "Wuschel's ASIO4ALL"; } } if(comboAudioInput1.Text != "Wuschel's ASIO4ALL") { foreach(PADeviceInfo dev in comboAudioInput1.Items) { if(dev.Name == "ASIO4ALL v2") { comboAudioInput1.Text = "ASIO4ALL v2"; comboAudioOutput1.Text = "ASIO4ALL v2"; } } } comboAudioReceive1.Text = "Line In"; for(int i=0; i<comboAudioTransmit1.Items.Count; i++) { if(((string)comboAudioTransmit1.Items[i]).StartsWith("Mi")) { comboAudioTransmit1.SelectedIndex = i; break; } } if(comboAudioMixer1.SelectedIndex < 0 || (comboAudioMixer1.Text != "Sound Blaster" && comboAudioMixer1.Text != "USB Audio")) { MessageBox.Show(comboAudioSoundCard.Text+" not found.\n "+ "Please verify that this specific sound card is installed " + "and functioning and try again. \nIf your sound card is not " + "a "+comboAudioSoundCard.Text+" and your card is not in the "+ "list, use the Unsupported Card selection. \nFor more support, "+ "email [email protected].", comboAudioSoundCard.Text+" Not Found", MessageBoxButtons.OK, MessageBoxIcon.Exclamation); console.PowerEnabled = false; } else if(!Mixer.InitMP3Plus(console.MixerID1)) { MessageBox.Show("The "+comboAudioSoundCard.Text+" mixer initialization "+ "failed. Please install the latest drivers from www.creativelabs.com " + " and try again. For more support, email [email protected].", comboAudioSoundCard.Text+" Mixer Initialization Failed", MessageBoxButtons.OK, MessageBoxIcon.Exclamation); console.PowerEnabled = false; } else if(comboAudioInput1.Text != "ASIO4ALL v2" && comboAudioInput1.Text != "Wuschel's ASIO4ALL") { MessageBox.Show("ASIO4ALL driver not found. Please visit " + "www.asio4all.com, download and install the driver, "+ "and try again. Alternatively, you can use the Unsupported "+ "Card selection and setup the sound interface manually. For "+ "more support, email [email protected].", "ASIO4ALL Not Found", MessageBoxButtons.OK, MessageBoxIcon.Exclamation); console.PowerEnabled = false; } else { udAudioLineIn1.Value = 6; console.PowerEnabled = true; grpAudioMicInGain1.Enabled = true; grpAudioLineInGain1.Enabled = true; comboAudioChannels1.Text = "2"; comboAudioChannels1.Enabled = false; Audio.IN_RX1_L = 0; Audio.IN_RX1_R = 1; Audio.IN_TX_L = 0; Audio.IN_TX_R = 1; } break; case SoundCard.DELTA_44: grpAudioDetails1.Enabled = false; grpAudioVolts1.Visible = chkAudioExpert.Checked; udAudioVoltage1.Value = 0.98M; if(!comboAudioSampleRate1.Items.Contains(96000)) comboAudioSampleRate1.Items.Add(96000); if(comboAudioSampleRate1.Items.Contains(192000)) comboAudioSampleRate1.Items.Remove(192000); if(comboAudioSoundCard.Focused || comboAudioSampleRate1.SelectedIndex < 0) comboAudioSampleRate1.Text = "48000"; foreach(PADeviceInfo p in comboAudioDriver1.Items) { if(p.Name == "ASIO") { comboAudioDriver1.SelectedItem = p; break; } } foreach(PADeviceInfo dev in comboAudioInput1.Items) { if(dev.Name == "M-Audio Delta ASIO") { comboAudioInput1.Text = "M-Audio Delta ASIO"; comboAudioOutput1.Text = "M-Audio Delta ASIO"; } } comboAudioMixer1.Text = "None"; if(comboAudioInput1.Text != "M-Audio Delta ASIO") { MessageBox.Show("M-Audio Delta ASIO driver not found. Please visit " + "www.m-audio.com, download and install the latest driver, "+ "and try again. For more support, email [email protected].", "Delta 44 Driver Not Found", MessageBoxButtons.OK, MessageBoxIcon.Exclamation); console.PowerEnabled = false; } else { InitDelta44(); chkAudioEnableVAC.Enabled = true; grpAudioMicInGain1.Enabled = false; grpAudioLineInGain1.Enabled = false; console.PowerEnabled = true; comboAudioChannels1.Text = "4"; comboAudioChannels1.Enabled = false; Audio.IN_RX1_L = 0; Audio.IN_RX1_R = 1; Audio.IN_TX_L = 2; Audio.IN_TX_R = 3; } break; case SoundCard.FIREBOX: grpAudioDetails1.Enabled = false; grpAudioVolts1.Visible = chkAudioExpert.Checked; udAudioVoltage1.Value = 6.39M; if(!comboAudioSampleRate1.Items.Contains(96000)) comboAudioSampleRate1.Items.Add(96000); if(comboAudioSampleRate1.Items.Contains(192000)) comboAudioSampleRate1.Items.Remove(192000); if(comboAudioSoundCard.Focused || comboAudioSampleRate1.SelectedIndex < 0) comboAudioSampleRate1.Text = "48000"; foreach(PADeviceInfo p in comboAudioDriver1.Items) { if(p.Name == "ASIO") { comboAudioDriver1.SelectedItem = p; break; } } foreach(PADeviceInfo dev in comboAudioInput1.Items) { if(dev.Name.IndexOf("FireBox") >= 0) { comboAudioInput1.Text = dev.Name; comboAudioOutput1.Text = dev.Name; } } comboAudioMixer1.Text = "None"; if(comboAudioInput1.Text.IndexOf("FireBox") < 0) { MessageBox.Show("PreSonus FireBox ASIO driver not found. Please visit " + "www.presonus.com, download and install the latest driver, "+ "and try again. For more support, email [email protected].", "PreSonus FireBox Driver Not Found", MessageBoxButtons.OK, MessageBoxIcon.Exclamation); console.PowerEnabled = false; } else { chkAudioEnableVAC.Enabled = true; grpAudioMicInGain1.Enabled = false; grpAudioLineInGain1.Enabled = false; console.PowerEnabled = true; comboAudioChannels1.Text = "4"; comboAudioChannels1.Enabled = false; Audio.IN_RX1_L = 2; Audio.IN_RX1_R = 3; Audio.IN_TX_L = 0; Audio.IN_TX_R = 1; Thread t = new Thread(new ThreadStart(FireBoxMixerFix)); t.Name = "FireBoxMixerFix"; t.Priority = ThreadPriority.Normal; t.IsBackground = true; t.Start(); } break; case SoundCard.EDIROL_FA_66: grpAudioDetails1.Enabled = false; grpAudioVolts1.Visible = chkAudioExpert.Checked; udAudioVoltage1.Value = 2.27M; if(!comboAudioSampleRate1.Items.Contains(96000)) comboAudioSampleRate1.Items.Add(96000); if(!comboAudioSampleRate1.Items.Contains(192000)) comboAudioSampleRate1.Items.Add(192000); if(comboAudioSoundCard.Focused || comboAudioSampleRate1.SelectedIndex < 0) comboAudioSampleRate1.Text = "192000"; foreach(PADeviceInfo p in comboAudioDriver1.Items) { if(p.Name == "ASIO") { comboAudioDriver1.SelectedItem = p; break; } } foreach(PADeviceInfo dev in comboAudioInput1.Items) { if(dev.Name == "EDIROL FA-66") { comboAudioInput1.Text = "EDIROL FA-66"; comboAudioOutput1.Text = "EDIROL FA-66"; } } comboAudioMixer1.Text = "None"; if(comboAudioInput1.Text != "EDIROL FA-66") { MessageBox.Show("Edirol FA-66 ASIO driver not found. Please visit " + "www.rolandus.com, download and install the latest driver, "+ "and try again. For more support, email [email protected].", "Edirol FA-66 Driver Not Found", MessageBoxButtons.OK, MessageBoxIcon.Exclamation); console.PowerEnabled = false; } else { chkAudioEnableVAC.Enabled = true; grpAudioMicInGain1.Enabled = false; grpAudioLineInGain1.Enabled = false; console.PowerEnabled = true; comboAudioChannels1.Text = "4"; comboAudioChannels1.Enabled = false; Audio.IN_RX1_L = 2; Audio.IN_RX1_R = 3; Audio.IN_TX_L = 0; Audio.IN_TX_R = 1; } break; case SoundCard.UNSUPPORTED_CARD: if(comboAudioSoundCard.Focused) { MessageBox.Show("Proper operation of the SDR-1000 depends on the use of a sound card that is\n"+ "officially recommended by FlexRadio Systems. Refer to the Specifications page on\n"+ "www.flexradio.com to determine which sound cards are currently recommended. Use only\n"+ "the specific model numbers stated on the website because other models within the same\n"+ "family may not work properly with the radio. Officially supported sound cards may be\n"+ "updated on the website without notice. If you have any question about the sound card\n"+ "you would like to use with the radio, please email [email protected] or call us at\n"+ "+1 (512) 535-4713 ext 2.\n\n"+ "NO WARRANTY IS IMPLIED WHEN THE SDR-1000 IS USED WITH ANY SOUND CARD OTHER\n"+ "THAN THOSE CURRENTLY RECOMMENDED AS STATED ON THE FLEXRADIO SYSTEMS WEBSITE.\n"+ "UNSUPPORTED SOUND CARDS MAY OR MAY NOT WORK WITH THE SDR-1000. USE OF\n"+ "UNSUPPORTED SOUND CARDS IS AT THE CUSTOMERS OWN RISK.", "Warning: Unsupported Card", MessageBoxButtons.OK, MessageBoxIcon.Warning); } grpAudioVolts1.Visible = true; if(comboAudioSoundCard.Focused) chkGeneralRXOnly.Checked = true; if(!comboAudioSampleRate1.Items.Contains(96000)) comboAudioSampleRate1.Items.Add(96000); if(!comboAudioSampleRate1.Items.Contains(192000)) comboAudioSampleRate1.Items.Add(192000); if(comboAudioSoundCard.Focused || comboAudioSampleRate1.SelectedIndex < 0) comboAudioSampleRate1.Text = "48000"; grpAudioDetails1.Enabled = true; grpAudioMicInGain1.Enabled = true; grpAudioLineInGain1.Enabled = true; console.PowerEnabled = true; comboAudioChannels1.Text = "2"; comboAudioChannels1.Enabled = true; Audio.IN_RX1_L = 0; Audio.IN_RX1_R = 1; Audio.IN_TX_L = 0; Audio.IN_TX_R = 1; break; } console.PWR = console.PWR; console.AF = console.AF; if(on) console.PowerOn = true; }
private void comboAudioSoundCard_SelectedIndexChanged(object sender, System.EventArgs e) { try { if (!initializing) { if (console.CurrentModel == Model.GENESIS_G6 && radGenModelGenesisG6.Checked) { comboAudioSoundCard.Text = "Genesis G6"; } else if (console.CurrentModel == Model.RTL_SDR && radGenModel_RTL_SDR.Checked) { comboAudioSoundCard.Text = "RTL SDR"; } bool on = console.PowerOn; if (on) { console.chkPower.Checked = false; Thread.Sleep(50); } SoundCard card = SoundCard.FIRST; switch (comboAudioSoundCard.Text) { case "M-Audio Delta 44 (PCI)": card = SoundCard.DELTA_44; break; case "PreSonus FireBox (FireWire)": card = SoundCard.FIREBOX; break; case "Edirol FA-66 (FireWire)": card = SoundCard.EDIROL_FA_66; break; case "SB Audigy (PCI)": card = SoundCard.AUDIGY; break; case "SB Audigy 2 (PCI)": card = SoundCard.AUDIGY_2; break; case "SB Audigy 2 ZS (PCI)": card = SoundCard.AUDIGY_2_ZS; break; case "Sound Blaster Extigy (USB)": card = SoundCard.EXTIGY; break; case "Sound Blaster MP3+ (USB)": card = SoundCard.MP3_PLUS; break; case "Turtle Beach Santa Cruz (PCI)": card = SoundCard.SANTA_CRUZ; break; case "Realtek HD audio": card = SoundCard.REALTEK_HD_AUDIO; break; case "No Mixer Audio Card": card = SoundCard.NO_MIXER_AUDIO_CARD; break; case "Unsupported Card": card = SoundCard.UNSUPPORTED_CARD; break; case "Genesis G6": card = SoundCard.G6; break; case "RTL SDR": card = SoundCard.RTL_SDR; break; } if (card == SoundCard.FIRST) return; console.CurrentSoundCard = card; if (card == SoundCard.G6) { string sr = comboAudioSampleRate1.Text; comboAudioSampleRate1.Enabled = true; current_sound_card = card; comboAudioDriver1.Items.Clear(); comboAudioDriver1.Items.Add("USB"); comboAudioDriver1.SelectedIndex = 0; comboAudioDriver1.Enabled = false; comboAudioOutput1.Items.Clear(); comboAudioOutput1.Items.Add("G6 output"); comboAudioOutput1.SelectedIndex = 0; comboAudioOutput1.Enabled = false; comboAudioInput1.Items.Clear(); comboAudioInput1.Items.Add("G6 input"); comboAudioInput1.SelectedIndex = 0; comboAudioInput1.Enabled = false; comboAudioMixer1.Enabled = false; comboAudioTransmit1.Items.Clear(); comboAudioReceive1.Items.Clear(); comboAudioReceive1.Enabled = false; comboAudioTransmit1.Enabled = false; comboAudioSampleRate1.Items.Clear(); comboAudioSampleRate1.Items.Add(48000); comboAudioSampleRate1.Items.Add(96000); comboAudioSampleRate1.Items.Add(192000); comboAudioSampleRate1.Text = sr; if (comboAudioSampleRate1.SelectedIndex < 0) comboAudioSampleRate1.SelectedIndex = 0; udAudioVoltage1.Enabled = true; udAudioMicGain1.Enabled = true; udAudioLineIn1.Enabled = true; grpAudioChannels.Enabled = true; grpAudioLatency1.Enabled = false; } else if (card == SoundCard.RTL_SDR) { string sr = comboAudioSampleRate1.Text; comboAudioSampleRate1.Enabled = false; current_sound_card = card; comboAudioDriver1.Items.Clear(); comboAudioDriver1.Items.Add("USB"); comboAudioDriver1.SelectedIndex = 0; comboAudioDriver1.Enabled = false; comboAudioOutput1.Items.Clear(); comboAudioOutput1.Items.Add("RTL SDR"); comboAudioOutput1.SelectedIndex = 0; comboAudioOutput1.Enabled = false; comboAudioInput1.Items.Clear(); comboAudioInput1.Items.Add("RTL SDR"); comboAudioInput1.SelectedIndex = 0; comboAudioInput1.Enabled = false; comboAudioMixer1.Enabled = false; comboAudioTransmit1.Items.Clear(); comboAudioReceive1.Items.Clear(); comboAudioReceive1.Enabled = false; comboAudioTransmit1.Enabled = false; comboAudioSampleRate1.Items.Clear(); comboAudioSampleRate1.Items.Add(250000); comboAudioSampleRate1.Items.Add(960000); comboAudioSampleRate1.Items.Add(1024000); comboAudioSampleRate1.Items.Add(1200000); comboAudioSampleRate1.Items.Add(1440000); comboAudioSampleRate1.Items.Add(1800000); comboAudioSampleRate1.Items.Add(2400000); comboAudioSampleRate1.Items.Add(2880000); comboAudioSampleRate1.Items.Add(3200000); comboAudioSampleRate1.Text = sr; if (comboAudioSampleRate1.SelectedIndex < 0) comboAudioSampleRate1.SelectedIndex = 0; udAudioVoltage1.Enabled = false; udAudioMicGain1.Enabled = false; udAudioLineIn1.Enabled = false; grpAudioChannels.Enabled = false; grpAudioLatency1.Enabled = false; } else { comboAudioSampleRate1.Enabled = true; udAudioVoltage1.Enabled = true; udAudioMicGain1.Enabled = true; udAudioLineIn1.Enabled = true; grpAudioChannels.Enabled = true; grpAudioLatency1.Enabled = true; if (!console.booting) { string sr = comboAudioSampleRate1.Text; current_sound_card = card; GetHosts(); GetDevices1(); GetMixerDevices(); comboAudioOutput1.Enabled = true; comboAudioInput1.Enabled = true; comboAudioMixer1.Enabled = true; if(comboAudioInput1.Items.Count>0) comboAudioInput1.SelectedIndex = 0; if (comboAudioOutput1.Items.Count > 0) comboAudioOutput1.SelectedIndex = 0; comboAudioReceive1.Enabled = true; comboAudioTransmit1.Enabled = true; comboAudioSampleRate1.Items.Clear(); comboAudioSampleRate1.Items.Add(24000); comboAudioSampleRate1.Items.Add(44100); comboAudioSampleRate1.Items.Add(48000); comboAudioSampleRate1.Items.Add(96000); comboAudioSampleRate1.Items.Add(192000); comboAudioSampleRate1.Text = sr; if (comboAudioSampleRate1.SelectedIndex < 0) comboAudioSampleRate1.SelectedIndex = 0; } } switch (card) { case SoundCard.NO_MIXER_AUDIO_CARD: { bool success = false; bool condition1 = false; bool condition2 = false; int i; chkLineMic.Enabled = false; chkLineMic.Checked = false; for (i = 0; i < comboAudioMixer1.Items.Count; i++) { comboAudioMixer1.SelectedIndex = i; if (comboAudioMixer1.Text.Contains("nput")) { console.MixerID1 = comboAudioMixer1.SelectedIndex; condition1 = true; } else if (comboAudioMixer1.Text.Contains("utput")) { console.MixerID2 = comboAudioMixer1.SelectedIndex; condition2 = true; } } if (condition1 && condition2) { if (Mixer.InitNoMixerAudioPlay(console.MixerID2) && Mixer.InitNoMixerAudioRecord(console.MixerID1, (int)udAudioLineIn1.Value)) { if (!comboAudioSampleRate1.Items.Contains(96000)) comboAudioSampleRate1.Items.Add(96000); if (comboAudioSoundCard.Focused || comboAudioSampleRate1.SelectedIndex < 0) comboAudioSampleRate1.Text = "48000"; console.PowerEnabled = true; comboAudioChannels1.Text = "2"; comboAudioChannels1.Enabled = true; comboAudioInput1.Enabled = false; comboAudioOutput1.Enabled = false; comboAudioMixer1.Enabled = false; comboAudioReceive1.Enabled = false; comboAudioTransmit1.Enabled = false; comboAudioInput1.Text = "Primary input"; comboAudioOutput1.Text = "Audio output"; comboAudioMixer1.Text = "None"; comboAudioReceive1.Items.Clear(); comboAudioTransmit1.Items.Clear(); comboAudioReceive1.Items.Add("Line-In"); comboAudioTransmit1.Items.Add("Microphone"); comboAudioReceive1.SelectedIndex = 0; comboAudioTransmit1.SelectedIndex = 0; success = true; } else { MessageBox.Show("The " + comboAudioSoundCard.Text + " mixer initialization " + "failed. Please install the latest drivers" + " and try again. For more support, email [email protected].", comboAudioSoundCard.Text + " Mixer Initialization Failed", MessageBoxButtons.OK, MessageBoxIcon.Exclamation); console.PowerEnabled = false; } } if (!success) { MessageBox.Show(comboAudioSoundCard.Text + " not found.\n " + "Please verify that this specific sound card is installed " + "and functioning and try again. \nIf your sound card is not " + "a " + comboAudioSoundCard.Text + " and your card is not in the " + "list, use the Unsupported Card selection. \nFor more support, " + "email [email protected]", comboAudioSoundCard.Text + " Not Found", MessageBoxButtons.OK, MessageBoxIcon.Exclamation); console.PowerEnabled = false; comboAudioMixer1.Enabled = false; comboAudioInput1.Enabled = false; comboAudioOutput1.Enabled = false; } } break; case SoundCard.REALTEK_HD_AUDIO: { bool success = false; bool condition1 = false; bool condition2 = false; bool condition3 = false; int i; switch (console.WinVer) { case WindowsVersion.WindowsVista: case WindowsVersion.Windows7: case WindowsVersion.Windows8: comboAudioDriver1.Text = "MME"; for (i = 0; i < comboAudioInput1.Items.Count; i++) { comboAudioInput1.SelectedIndex = i; if (comboAudioInput1.Text.Contains("High") && comboAudioInput1.Text.Contains("Definition") && comboAudioInput1.Text.Contains("Audio") && comboAudioInput1.Text.Contains("Line In")) { Audio.Input1 = comboAudioInput1.SelectedIndex; condition1 = true; i = comboAudioInput1.Items.Count; } } for (i = 0; i < comboAudioOutput1.Items.Count; i++) { comboAudioOutput1.SelectedIndex = i; if (comboAudioOutput1.Text.Contains("High Definition Audio") && comboAudioOutput1.Text.Contains("Speakers")) { Audio.Output1 = comboAudioOutput1.SelectedIndex + comboAudioInput1.Items.Count; condition2 = true; i = comboAudioOutput1.Items.Count; } } /*for (i = 0; i < comboAudioTransmit1.Items.Count; i++) { comboAudioTransmit1.SelectedIndex = i; if (comboAudioTransmit1.Text.Contains("High Definition Audio Device") && comboAudioTransmit1.Text.Contains("Microphone")) { Audio.Input2 = comboAudioTransmit1.SelectedIndex; condition3 = true; i = comboAudioTransmit1.Items.Count; } }*/ if (condition1 && condition2) { success = true; comboAudioMixer1.Text = "None"; comboAudioMixer1.Enabled = false; comboAudioInput1.Enabled = false; comboAudioOutput1.Enabled = false; comboAudioDriver1.Enabled = false; comboAudioReceive1.Enabled = false; comboAudioTransmit1.Enabled = false; comboAudioChannels1.Text = "2"; comboAudioSampleRate1.Text = "48000"; } if (!success) { MessageBox.Show("High Definition Audio not found.\n " + "Please verify that this specific sound card is installed " + "and functioning and try again. \nIf your sound card is not " + "a High Definition Audio and your card is not in the " + "list, use the Unsupported Card selection. \nFor more support, " + "email [email protected] or join Genesis Yahoo group " + "(http://groups.yahoo.com/group/GenesisRadio)", comboAudioSoundCard.Text + " Not Found", MessageBoxButtons.OK, MessageBoxIcon.Exclamation); console.PowerEnabled = false; comboAudioMixer1.Enabled = false; comboAudioInput1.Enabled = false; comboAudioOutput1.Enabled = false; } break; case WindowsVersion.WindowsXP: case WindowsVersion.Windows2000: { for (i = 0; i < comboAudioMixer1.Items.Count; i++) { comboAudioMixer1.SelectedIndex = i; if (comboAudioMixer1.Text == "Realtek HD Audio Input") { console.MixerID1 = comboAudioMixer1.SelectedIndex; condition1 = true; } else if (comboAudioMixer1.Text == "Realtek HD Audio output") { console.MixerID2 = comboAudioMixer1.SelectedIndex; condition2 = true; } } if (condition1 && condition2) { if (Mixer.InitRealtekHDaudioPlay(console.MixerID2) && Mixer.InitRealtekHDaudioRecord(console.MixerID1, (int)udAudioLineIn1.Value)) { if (!comboAudioSampleRate1.Items.Contains(96000)) comboAudioSampleRate1.Items.Add(96000); if (comboAudioSoundCard.Focused || comboAudioSampleRate1.SelectedIndex < 0) comboAudioSampleRate1.Text = "48000"; console.PowerEnabled = true; comboAudioChannels1.Text = "2"; comboAudioChannels1.Enabled = true; comboAudioInput1.Enabled = false; comboAudioOutput1.Enabled = false; comboAudioMixer1.Enabled = false; comboAudioReceive1.Enabled = false; comboAudioTransmit1.Enabled = false; if (comboAudioDriver1.Text == "MME" || comboAudioDriver1.Text.Contains("WDM") || comboAudioDriver1.Text.Contains("Windows")) { } else comboAudioDriver1.Text = "MME"; comboAudioDriver1.Enabled = false; comboAudioInput1.Text = "Realtek HDA Audio Input"; comboAudioOutput1.Text = "Realtek HD Audio output"; comboAudioMixer1.Text = "None"; comboAudioReceive1.Items.Clear(); comboAudioTransmit1.Items.Clear(); comboAudioReceive1.Items.Add("Line-In"); comboAudioTransmit1.Items.Add("Microphone"); comboAudioReceive1.SelectedIndex = 0; comboAudioTransmit1.SelectedIndex = 0; success = true; } else { MessageBox.Show("The " + comboAudioSoundCard.Text + " mixer initialization " + "failed. Please install the latest drivers from www.realtek.com " + " and try again. For more support, email [email protected]." + "or join Genesis Yahoo group (http://groups.yahoo.com/group/GenesisRadio)", comboAudioSoundCard.Text + " Mixer Initialization Failed", MessageBoxButtons.OK, MessageBoxIcon.Exclamation); console.PowerEnabled = false; } } if (!success) { MessageBox.Show(comboAudioSoundCard.Text + " not found.\n " + "Please verify that this specific sound card is installed " + "and functioning and try again. \nIf your sound card is not " + "a " + comboAudioSoundCard.Text + " and your card is not in the " + "list, use the Unsupported Card selection. \nFor more support, " + "email [email protected] or join Genesis Yahoo group " + "(http://groups.yahoo.com/group/GenesisRadio)", comboAudioSoundCard.Text + " Not Found", MessageBoxButtons.OK, MessageBoxIcon.Exclamation); console.PowerEnabled = false; comboAudioMixer1.Enabled = false; comboAudioInput1.Enabled = false; comboAudioOutput1.Enabled = false; } } break; } } break; case SoundCard.SANTA_CRUZ: udAudioVoltage1.Value = 1.274M; if (comboAudioSampleRate1.Items.Contains(96000)) comboAudioSampleRate1.Items.Remove(96000); if (comboAudioSampleRate1.Items.Contains(192000)) comboAudioSampleRate1.Items.Remove(192000); comboAudioSampleRate1.Text = "48000"; foreach (PADeviceInfo p in comboAudioDriver1.Items) { if (p.Name == "ASIO") { comboAudioDriver1.SelectedItem = p; break; } } foreach (PADeviceInfo dev in comboAudioInput1.Items) { if (dev.Name == "Wuschel's ASIO4ALL") { comboAudioInput1.Text = "Wuschel's ASIO4ALL"; comboAudioOutput1.Text = "Wuschel's ASIO4ALL"; } } if (comboAudioInput1.Text != "Wuschel's ASIO4ALL") { foreach (PADeviceInfo dev in comboAudioInput1.Items) { if (dev.Name == "ASIO4ALL v2") { comboAudioInput1.Text = "ASIO4ALL v2"; comboAudioOutput1.Text = "ASIO4ALL v2"; } } } comboAudioMixer1.Text = "Santa Cruz(tm)"; comboAudioReceive1.Text = "Line In"; for (int i = 0; i < comboAudioTransmit1.Items.Count; i++) { if (((string)comboAudioTransmit1.Items[i]).StartsWith("Mi")) { comboAudioTransmit1.SelectedIndex = i; break; } } if (comboAudioMixer1.SelectedIndex < 0 || comboAudioMixer1.Text != "Santa Cruz(tm)") { MessageBox.Show(comboAudioSoundCard.Text + " not found.\n " + "Please verify that this specific sound card is installed " + "and functioning and try again. \nIf your sound card is not " + "a " + comboAudioSoundCard.Text + " and your card is not in the " + "list, use the Unsupported Card selection. \nFor more support, " + "email [email protected].", comboAudioSoundCard.Text + " Not Found", MessageBoxButtons.OK, MessageBoxIcon.Exclamation); console.PowerEnabled = false; } else if (!Mixer.InitSantaCruz(console.MixerID1)) { MessageBox.Show("The " + comboAudioSoundCard.Text + " mixer initialization " + "failed. Please install the latest drivers from www.turtlebeach.com " + " and try again. For more support, email [email protected].", comboAudioSoundCard.Text + " Mixer Initialization Failed", MessageBoxButtons.OK, MessageBoxIcon.Exclamation); console.PowerEnabled = false; } else if (comboAudioInput1.Text != "ASIO4ALL v2" && comboAudioInput1.Text != "Wuschel's ASIO4ALL") { MessageBox.Show("ASIO4ALL driver not found. Please visit " + "www.asio4all.com, download and install the driver, " + "and try again. Alternatively, you can use the Unsupported " + "Card selection and setup the sound interface manually. For " + "more support, email [email protected].", "ASIO4ALL Not Found", MessageBoxButtons.OK, MessageBoxIcon.Exclamation); console.PowerEnabled = false; } else { udAudioLineIn1.Value = 20; console.PowerEnabled = true; comboAudioChannels1.Text = "2"; comboAudioChannels1.Enabled = false; } break; case SoundCard.AUDIGY: case SoundCard.AUDIGY_2: udAudioVoltage1.Value = 2.23M; if (comboAudioSampleRate1.Items.Contains(96000)) comboAudioSampleRate1.Items.Remove(96000); if (comboAudioSampleRate1.Items.Contains(192000)) comboAudioSampleRate1.Items.Remove(192000); comboAudioSampleRate1.Text = "48000"; foreach (PADeviceInfo p in comboAudioDriver1.Items) { if (p.Name == "ASIO") { comboAudioDriver1.SelectedItem = p; break; } } foreach (PADeviceInfo dev in comboAudioInput1.Items) { if (dev.Name == "Wuschel's ASIO4ALL") { comboAudioInput1.Text = "Wuschel's ASIO4ALL"; comboAudioOutput1.Text = "Wuschel's ASIO4ALL"; } } if (comboAudioInput1.Text != "Wuschel's ASIO4ALL") { foreach (PADeviceInfo dev in comboAudioInput1.Items) { if (dev.Name == "ASIO4ALL v2") { comboAudioInput1.Text = "ASIO4ALL v2"; comboAudioOutput1.Text = "ASIO4ALL v2"; } } } for (int i = 0; i < comboAudioMixer1.Items.Count; i++) { if (((string)comboAudioMixer1.Items[i]).StartsWith("SB Audigy")) { comboAudioMixer1.SelectedIndex = i; break; } } for (int i = 0; i < comboAudioReceive1.Items.Count; i++) { if (((string)comboAudioReceive1.Items[i]).StartsWith("Analog")) { comboAudioReceive1.SelectedIndex = i; break; } } if (comboAudioReceive1.SelectedIndex < 0 || !comboAudioReceive1.Text.StartsWith("Analog")) { for (int i = 0; i < comboAudioReceive1.Items.Count; i++) { if (((string)comboAudioReceive1.Items[i]).StartsWith("Mix ana")) { comboAudioReceive1.SelectedIndex = i; break; } } } for (int i = 0; i < comboAudioTransmit1.Items.Count; i++) { if (((string)comboAudioTransmit1.Items[i]).StartsWith("Mi")) { comboAudioTransmit1.SelectedIndex = i; break; } } if (comboAudioMixer1.SelectedIndex < 0 || !comboAudioMixer1.Text.StartsWith("SB Audigy")) { MessageBox.Show(comboAudioSoundCard.Text + " not found.\n " + "Please verify that this specific sound card is installed " + "and functioning and try again. \nIf your sound card is not " + "a " + comboAudioSoundCard.Text + " and your card is not in the " + "list, use the Unsupported Card selection. \nFor more support, " + "email [email protected].", comboAudioSoundCard.Text + " Not Found", MessageBoxButtons.OK, MessageBoxIcon.Exclamation); console.PowerEnabled = false; } else if (!Mixer.InitAudigy2(console.MixerID1)) { MessageBox.Show("The " + comboAudioSoundCard.Text + " mixer initialization " + "failed. Please install the latest drivers from www.creativelabs.com " + " and try again. For more support, email [email protected].", comboAudioSoundCard.Text + " Mixer Initialization Failed", MessageBoxButtons.OK, MessageBoxIcon.Exclamation); console.PowerEnabled = false; } else if (comboAudioInput1.Text != "ASIO4ALL v2" && comboAudioInput1.Text != "Wuschel's ASIO4ALL") { MessageBox.Show("ASIO4ALL driver not found. Please visit " + "www.asio4all.com, download and install the driver, " + "and try again. Alternatively, you can use the Unsupported " + "Card selection and setup the sound interface manually. For " + "more support, email [email protected].", "ASIO4ALL Not Found", MessageBoxButtons.OK, MessageBoxIcon.Exclamation); console.PowerEnabled = false; } else { udAudioLineIn1.Value = 1; console.PowerEnabled = true; comboAudioChannels1.Text = "2"; comboAudioChannels1.Enabled = false; } break; case SoundCard.AUDIGY_2_ZS: udAudioVoltage1.Value = 2.23M; chkLineMic.Enabled = false; chkLineMic.Checked = false; if (!comboAudioSampleRate1.Items.Contains(96000)) comboAudioSampleRate1.Items.Add(96000); if (comboAudioSampleRate1.Items.Contains(192000)) comboAudioSampleRate1.Items.Remove(192000); comboAudioSampleRate1.Text = "96000"; foreach (PADeviceInfo p in comboAudioDriver1.Items) { if (p.Name == "ASIO") { comboAudioDriver1.SelectedItem = p; break; } } foreach (PADeviceInfo dev in comboAudioInput1.Items) { if (dev.Name == "Wuschel's ASIO4ALL") { comboAudioInput1.Text = "Wuschel's ASIO4ALL"; comboAudioOutput1.Text = "Wuschel's ASIO4ALL"; } } if (comboAudioInput1.Text != "Wuschel's ASIO4ALL") { foreach (PADeviceInfo dev in comboAudioInput1.Items) { if (dev.Name == "ASIO4ALL v2") { comboAudioInput1.Text = "ASIO4ALL v2"; comboAudioOutput1.Text = "ASIO4ALL v2"; } } } switch (console.WinVer) { case WindowsVersion.Windows2000: case WindowsVersion.WindowsXP: { for (int i = 0; i < comboAudioMixer1.Items.Count; i++) { if (((string)comboAudioMixer1.Items[i]).StartsWith("SB Audigy 2 ZS")) { comboAudioMixer1.SelectedIndex = i; break; } } GetMuxLineNames1(); for (int i = 0; i < comboAudioReceive1.Items.Count; i++) { if (((string)comboAudioReceive1.Items[i]).StartsWith("Analog") || ((string)comboAudioReceive1.Items[i]).Contains("Line")) { comboAudioReceive1.SelectedIndex = i; i = comboAudioReceive1.Items.Count; } } for (int i = 0; i < comboAudioTransmit1.Items.Count; i++) { if (((string)comboAudioTransmit1.Items[i]).StartsWith("Mic") || ((string)comboAudioTransmit1.Items[i]).Contains("Mic")) { comboAudioTransmit1.SelectedIndex = i; i = comboAudioTransmit1.Items.Count; } } } break; } if (comboAudioMixer1.SelectedIndex < 0 || !comboAudioMixer1.Text.StartsWith("SB Audigy")) { MessageBox.Show(comboAudioSoundCard.Text + " not found.\n " + "Please verify that this specific sound card is installed " + "and functioning and try again. \nIf your sound card is not " + "a " + comboAudioSoundCard.Text + " and your card is not in the " + "list, use the Unsupported Card selection. \nFor more support, " + "email [email protected].", comboAudioSoundCard.Text + " Not Found", MessageBoxButtons.OK, MessageBoxIcon.Exclamation); console.PowerEnabled = false; } else if (!Mixer.InitAudigy2ZS(console.MixerID1)) { MessageBox.Show("The " + comboAudioSoundCard.Text + " mixer initialization " + "failed. Please install the latest drivers from www.creativelabs.com " + " and try again. For more support, email [email protected].", comboAudioSoundCard.Text + " Mixer Initialization Failed", MessageBoxButtons.OK, MessageBoxIcon.Exclamation); console.PowerEnabled = false; } else if (comboAudioInput1.Text != "ASIO4ALL v2" && comboAudioInput1.Text != "Wuschel's ASIO4ALL") { MessageBox.Show("ASIO4ALL driver not found. Please visit " + "www.asio4all.com, download and install the driver, " + "and try again. Alternatively, you can use the Unsupported " + "Card selection and setup the sound interface manually. For " + "more support, email [email protected].", "ASIO4ALL Not Found", MessageBoxButtons.OK, MessageBoxIcon.Exclamation); console.PowerEnabled = false; } else { udAudioLineIn1.Value = 1; console.PowerEnabled = true; comboAudioChannels1.Text = "2"; comboAudioChannels1.Enabled = false; } break; case SoundCard.EXTIGY: udAudioVoltage1.Value = 1.96M; if (!comboAudioSampleRate1.Items.Contains(96000)) comboAudioSampleRate1.Items.Add(96000); if (comboAudioSampleRate1.Items.Contains(192000)) comboAudioSampleRate1.Items.Remove(192000); comboAudioSampleRate1.Text = "48000"; foreach (PADeviceInfo p in comboAudioDriver1.Items) { if (p.Name == "ASIO") { comboAudioDriver1.SelectedItem = p; break; } } foreach (PADeviceInfo dev in comboAudioInput1.Items) { if (dev.Name == "Wuschel's ASIO4ALL") { comboAudioInput1.Text = "Wuschel's ASIO4ALL"; comboAudioOutput1.Text = "Wuschel's ASIO4ALL"; } } if (comboAudioInput1.Text != "Wuschel's ASIO4ALL") { foreach (PADeviceInfo dev in comboAudioInput1.Items) { if (dev.Name == "ASIO4ALL v2") { comboAudioInput1.Text = "ASIO4ALL v2"; comboAudioOutput1.Text = "ASIO4ALL v2"; } } } for (int i = 0; i < comboAudioMixer1.Items.Count; i++) { if (((string)comboAudioMixer1.Items[i]).StartsWith("Creative SB Extigy")) { comboAudioMixer1.SelectedIndex = i; break; } } comboAudioReceive1.Text = "Line In"; if (!console.LineMicShared) comboAudioTransmit1.Text = "Microphone"; else comboAudioTransmit1.Text = "Line In"; if (comboAudioMixer1.SelectedIndex < 0 || comboAudioMixer1.Text != "Creative SB Extigy") { MessageBox.Show(comboAudioSoundCard.Text + " not found.\n " + "Please verify that this specific sound card is installed " + "and functioning and try again. \nIf your sound card is not " + "a " + comboAudioSoundCard.Text + " and your card is not in the " + "list, use the Unsupported Card selection. \nFor more support, " + "email [email protected].", comboAudioSoundCard.Text + " Not Found", MessageBoxButtons.OK, MessageBoxIcon.Exclamation); console.PowerEnabled = false; } else if (!Mixer.InitExtigy(console.MixerID1)) { MessageBox.Show("The " + comboAudioSoundCard.Text + " mixer initialization " + "failed. Please install the latest drivers from www.creativelabs.com " + " and try again. For more support, email [email protected].", comboAudioSoundCard.Text + " Mixer Initialization Failed", MessageBoxButtons.OK, MessageBoxIcon.Exclamation); console.PowerEnabled = false; } else if (comboAudioInput1.Text != "ASIO4ALL v2" && comboAudioInput1.Text != "Wuschel's ASIO4ALL") { MessageBox.Show("ASIO4ALL driver not found. Please visit " + "www.asio4all.com, download and install the driver, " + "and try again. Alternatively, you can use the Unsupported " + "Card selection and setup the sound interface manually. For " + "more support, email [email protected].", "ASIO4ALL Not Found", MessageBoxButtons.OK, MessageBoxIcon.Exclamation); console.PowerEnabled = false; } else { udAudioLineIn1.Value = 20; console.PowerEnabled = true; comboAudioChannels1.Text = "2"; comboAudioChannels1.Enabled = false; } break; case SoundCard.MP3_PLUS: udAudioVoltage1.Value = 0.982M; if (comboAudioSampleRate1.Items.Contains(96000)) comboAudioSampleRate1.Items.Remove(96000); if (comboAudioSampleRate1.Items.Contains(192000)) comboAudioSampleRate1.Items.Remove(192000); comboAudioSampleRate1.Text = "48000"; foreach (PADeviceInfo p in comboAudioDriver1.Items) { if (p.Name == "ASIO") { comboAudioDriver1.SelectedItem = p; break; } } for (int i = 0; i < comboAudioMixer1.Items.Count; i++) { if (((string)comboAudioMixer1.Items[i]).StartsWith("Sound Blaster")) { comboAudioMixer1.SelectedIndex = i; break; } } if (comboAudioMixer1.SelectedIndex < 0 || (string)comboAudioMixer1.SelectedItem != "Sound Blaster") { for (int i = 0; i < comboAudioMixer1.Items.Count; i++) { if (((string)comboAudioMixer1.Items[i]).StartsWith("USB Audio")) { comboAudioMixer1.SelectedIndex = i; break; } } } foreach (PADeviceInfo dev in comboAudioInput1.Items) { if (dev.Name == "Wuschel's ASIO4ALL") { comboAudioInput1.Text = "Wuschel's ASIO4ALL"; comboAudioOutput1.Text = "Wuschel's ASIO4ALL"; } } if (comboAudioInput1.Text != "Wuschel's ASIO4ALL") { foreach (PADeviceInfo dev in comboAudioInput1.Items) { if (dev.Name == "ASIO4ALL v2") { comboAudioInput1.Text = "ASIO4ALL v2"; comboAudioOutput1.Text = "ASIO4ALL v2"; } } } comboAudioReceive1.Text = "Line In"; for (int i = 0; i < comboAudioTransmit1.Items.Count; i++) { if (((string)comboAudioTransmit1.Items[i]).StartsWith("Mi")) { comboAudioTransmit1.SelectedIndex = i; break; } } if (comboAudioMixer1.SelectedIndex < 0 || (comboAudioMixer1.Text != "Sound Blaster" && comboAudioMixer1.Text != "USB Audio")) { MessageBox.Show(comboAudioSoundCard.Text + " not found.\n " + "Please verify that this specific sound card is installed " + "and functioning and try again. \nIf your sound card is not " + "a " + comboAudioSoundCard.Text + " and your card is not in the " + "list, use the Unsupported Card selection. \nFor more support, " + "email [email protected].", comboAudioSoundCard.Text + " Not Found", MessageBoxButtons.OK, MessageBoxIcon.Exclamation); console.PowerEnabled = false; } else if (!Mixer.InitMP3Plus(console.MixerID1)) { MessageBox.Show("The " + comboAudioSoundCard.Text + " mixer initialization " + "failed. Please install the latest drivers from www.creativelabs.com " + " and try again. For more support, email [email protected].", comboAudioSoundCard.Text + " Mixer Initialization Failed", MessageBoxButtons.OK, MessageBoxIcon.Exclamation); console.PowerEnabled = false; } else if (comboAudioInput1.Text != "ASIO4ALL v2" && comboAudioInput1.Text != "Wuschel's ASIO4ALL") { MessageBox.Show("ASIO4ALL driver not found. Please visit " + "www.asio4all.com, download and install the driver, " + "and try again. Alternatively, you can use the Unsupported " + "Card selection and setup the sound interface manually. For " + "more support, email [email protected].", "ASIO4ALL Not Found", MessageBoxButtons.OK, MessageBoxIcon.Exclamation); console.PowerEnabled = false; } else { udAudioLineIn1.Value = 6; console.PowerEnabled = true; comboAudioChannels1.Text = "2"; comboAudioChannels1.Enabled = false; } break; case SoundCard.DELTA_44: udAudioVoltage1.Value = 0.98M; if (!comboAudioSampleRate1.Items.Contains(96000)) comboAudioSampleRate1.Items.Add(96000); if (comboAudioSampleRate1.Items.Contains(192000)) comboAudioSampleRate1.Items.Remove(192000); if (comboAudioSoundCard.Focused || comboAudioSampleRate1.SelectedIndex < 0) comboAudioSampleRate1.Text = "96000"; foreach (PADeviceInfo p in comboAudioDriver1.Items) { if (p.Name == "ASIO") { comboAudioDriver1.SelectedItem = p; break; } } foreach (PADeviceInfo dev in comboAudioInput1.Items) { if (dev.Name == "M-Audio Delta ASIO") { comboAudioInput1.Text = "M-Audio Delta ASIO"; comboAudioOutput1.Text = "M-Audio Delta ASIO"; } } comboAudioMixer1.Text = "None"; if (comboAudioInput1.Text != "M-Audio Delta ASIO") { MessageBox.Show("M-Audio Delta ASIO driver not found. Please visit " + "www.m-audio.com, download and install the latest driver, " + "and try again. For more support, email [email protected].", "Delta 44 Driver Not Found", MessageBoxButtons.OK, MessageBoxIcon.Exclamation); console.PowerEnabled = false; } else { InitDelta44(); chkAudioEnableVAC.Enabled = true; console.PowerEnabled = true; comboAudioChannels1.Text = "4"; comboAudioChannels1.Enabled = false; } break; case SoundCard.FIREBOX: udAudioVoltage1.Value = 6.39M; if (!comboAudioSampleRate1.Items.Contains(96000)) comboAudioSampleRate1.Items.Add(96000); if (comboAudioSampleRate1.Items.Contains(192000)) comboAudioSampleRate1.Items.Remove(192000); if (comboAudioSoundCard.Focused || comboAudioSampleRate1.SelectedIndex < 0) comboAudioSampleRate1.Text = "48000"; foreach (PADeviceInfo p in comboAudioDriver1.Items) { if (p.Name == "ASIO") { comboAudioDriver1.SelectedItem = p; break; } } foreach (PADeviceInfo dev in comboAudioInput1.Items) { if (dev.Name == "PreSonus ASIO Driver (FireBox)") { comboAudioInput1.Text = "PreSonus ASIO Driver (FireBox)"; comboAudioOutput1.Text = "PreSonus ASIO Driver (FireBox)"; } } comboAudioMixer1.Text = "None"; if (comboAudioInput1.Text != "PreSonus ASIO Driver (FireBox)") { MessageBox.Show("PreSonus FireBox ASIO driver not found. Please visit " + "www.presonus.com, download and install the latest driver, " + "and try again. For more support, email [email protected].", "PreSonus FireBox Driver Not Found", MessageBoxButtons.OK, MessageBoxIcon.Exclamation); console.PowerEnabled = false; } else { chkAudioEnableVAC.Enabled = true; console.PowerEnabled = true; comboAudioChannels1.Text = "4"; comboAudioChannels1.Enabled = false; Thread t = new Thread(new ThreadStart(FireBoxMixerFix)); t.Name = "FireBoxMixerFix"; t.Priority = ThreadPriority.Normal; t.IsBackground = true; t.Start(); } break; case SoundCard.EDIROL_FA_66: udAudioVoltage1.Value = 2.327M; if (!comboAudioSampleRate1.Items.Contains(96000)) comboAudioSampleRate1.Items.Add(96000); if (!comboAudioSampleRate1.Items.Contains(192000)) comboAudioSampleRate1.Items.Add(192000); if (comboAudioSoundCard.Focused || comboAudioSampleRate1.SelectedIndex < 0) comboAudioSampleRate1.Text = "192000"; foreach (PADeviceInfo p in comboAudioDriver1.Items) { if (p.Name == "ASIO") { comboAudioDriver1.SelectedItem = p; break; } } foreach (PADeviceInfo dev in comboAudioInput1.Items) { if (dev.Name == "EDIROL FA-66") { comboAudioInput1.Text = "EDIROL FA-66"; comboAudioOutput1.Text = "EDIROL FA-66"; } } comboAudioMixer1.Text = "None"; if (comboAudioInput1.Text != "EDIROL FA-66") { MessageBox.Show("Edirol FA-66 ASIO driver not found. Please visit " + "www.rolandus.com, download and install the latest driver, " + "and try again. \nFor more support, " + "email [email protected] or join Genesis Yahoo group " + "(http://groups.yahoo.com/group/GenesisRadio)", "Edirol FA-66 Driver Not Found", MessageBoxButtons.OK, MessageBoxIcon.Exclamation); console.PowerEnabled = false; } else { chkAudioEnableVAC.Enabled = true; console.PowerEnabled = true; comboAudioChannels1.Text = "4"; comboAudioChannels1.Enabled = false; } break; case SoundCard.UNSUPPORTED_CARD: comboAudioDriver1.Enabled = true; comboAudioReceive1.Enabled = true; comboAudioTransmit1.Enabled = true; chkLineMic.Enabled = true; chkLineMic.Checked = false; if (!comboAudioSampleRate1.Items.Contains(96000)) comboAudioSampleRate1.Items.Add(96000); if (!comboAudioSampleRate1.Items.Contains(192000)) comboAudioSampleRate1.Items.Add(192000); if (comboAudioSoundCard.Focused || comboAudioSampleRate1.SelectedIndex < 0) comboAudioSampleRate1.Text = "96000"; console.PowerEnabled = true; comboAudioChannels1.Text = "2"; comboAudioChannels1.Enabled = true; break; } console.PWR = console.PWR; console.AF = console.AF; if (on) console.chkPower.Checked = true; if (current_sound_card != SoundCard.UNSUPPORTED_CARD && (current_sound_card != SoundCard.G6 || current_sound_card != SoundCard.RTL_SDR)) { chkAudioExclusive.Checked = false; chkAudioExclusive.Enabled = false; } else chkAudioExclusive.Enabled = true; } else { settings.audio_card_index = comboAudioSoundCard.SelectedIndex; } } catch (Exception ex) { Debug.Write(ex.ToString()); } }
static async Task GiveTomWorkingComputer() { using var db = new MyDbContext(); var source = new Source { Name = "Company A" }; db.Sources.Add(source); var transaction = new Transaction { Source = source, SysTime = DateTime.UtcNow, User = "******" }; using var dbTransaction = await db.BeginTransactionAsync(transaction); var processor = new Processor { Name = "AMD Athlon X4 840 OEM" }; var motherBoard = new MotherBoard { Name = "MSI A68HM-E33 V2" }; var videoCard = new VideoCard { Name = "Palit GeForce GT 710 Silent LP [NEAT7100HD46-2080H]" }; var ram1 = new RAM { Name = "AMD Radeon R5 Entertainment Series [R532G1601U1S-U]" }; var ram2 = new RAM { Name = "Patriot Signature [PSD32G16002]" }; var soundCard = new SoundCard { Name = "ORIENT AU-01N" }; db.Processors.Add(processor); db.MotherBoards.Add(motherBoard); db.VideoCards.Add(videoCard); db.RAMs.Add(ram1); db.RAMs.Add(ram2); db.SoundCards.Add(soundCard); await db.SaveChangesAsync(); var workComputer = new Computer { Processor = processor, MotherBoard = motherBoard, VideoCard = videoCard, RAM1 = ram1, RAM2 = ram2, SoundCard = soundCard }; db.Computers.Add(workComputer); await db.SaveChangesAsync(); var tom = new User { Name = TomName, WorkComputer = workComputer }; db.Users.Add(tom); await db.SaveChangesAsync(); dbTransaction.Commit(); }