public override void OnShow() { base.OnShow(); CSound.RecordStart(); NameSelections[htNameSelections(NameSelection)].Init(); UpdateSlides(); UpdatePlayerNumber(); CheckMics(); CheckPlayers(); for (int i = 0; i < CSettings.MaxNumPlayer; i++) { //Update texture and name if (CConfig.Players[i] != String.Empty) { Statics[htStatics(StaticPlayerAvatar[i])].Texture = CProfiles.Profiles[CGame.Player[i].ProfileID].Avatar.Texture; Texts[htTexts(TextPlayer[i])].Text = CProfiles.Profiles[CGame.Player[i].ProfileID].PlayerName; } if (CGame.GetNumSongs() == 1 && CGame.GetSong(1).IsDuet) { SelectSlides[htSelectSlides(SelectSlideDuetPlayer[i])].Clear(); if (i + 1 <= CGame.NumPlayer) { SelectSlides[htSelectSlides(SelectSlideDuetPlayer[i])].Visible = true; } else { SelectSlides[htSelectSlides(SelectSlideDuetPlayer[i])].Visible = false; } SelectSlides[htSelectSlides(SelectSlideDuetPlayer[i])].AddValue(CGame.GetSong(1).DuetPart1); SelectSlides[htSelectSlides(SelectSlideDuetPlayer[i])].AddValue(CGame.GetSong(1).DuetPart2); if ((i + 1) % 2 == 0) { SelectSlides[htSelectSlides(SelectSlideDuetPlayer[i])].SetSelectionByValueIndex(1); } else { SelectSlides[htSelectSlides(SelectSlideDuetPlayer[i])].SetSelectionByValueIndex(0); } } else { SelectSlides[htSelectSlides(SelectSlideDuetPlayer[i])].Visible = false; } } SetInteractionToButton(Buttons[htButtons(ButtonStart)]); }
private void SaveMicConfig() { if (_devices == null) { return; } CSound.RecordStop(); SetMicConfig(); if (CheckMicConfig()) { for (int p = 0; p < CSettings.MaxNumPlayer; p++) { CConfig.MicConfig[p].Channel = 0; } for (int dev = 0; dev < _devices.Length; dev++) { for (int inp = 0; inp < _devices[dev].Inputs.Count; inp++) { if (_devices[dev].Inputs[inp].PlayerChannel1 > 0) { CConfig.MicConfig[_devices[dev].Inputs[inp].PlayerChannel1 - 1].Channel = 1; CConfig.MicConfig[_devices[dev].Inputs[inp].PlayerChannel1 - 1].DeviceName = _devices[dev].Name; CConfig.MicConfig[_devices[dev].Inputs[inp].PlayerChannel1 - 1].DeviceDriver = _devices[dev].Driver; CConfig.MicConfig[_devices[dev].Inputs[inp].PlayerChannel1 - 1].InputName = _devices[dev].Inputs[inp].Name; } if (_devices[dev].Inputs[inp].PlayerChannel2 > 0) { CConfig.MicConfig[_devices[dev].Inputs[inp].PlayerChannel2 - 1].Channel = 2; CConfig.MicConfig[_devices[dev].Inputs[inp].PlayerChannel2 - 1].DeviceName = _devices[dev].Name; CConfig.MicConfig[_devices[dev].Inputs[inp].PlayerChannel2 - 1].DeviceDriver = _devices[dev].Driver; CConfig.MicConfig[_devices[dev].Inputs[inp].PlayerChannel2 - 1].InputName = _devices[dev].Inputs[inp].Name; } } } CConfig.SaveConfig(); } CSound.RecordStart(); }
private void StartSong() { PrepareTimeLine(); CSound.Play(_CurrentStream); CSound.RecordStart(); }