public void UpdateUi(VoiceMeeter voiceMeeter) { if (ViewReferencesSet) { Log.Warning("MainActivity", "Update UI called"); if (!UserIsAdjustingGain) { gain0.Progress = Convert.ToInt32(voiceMeeter.Strips[0].Gain + 60); } pb_0.Progress = Convert.ToInt32(BindingSources.VoiceMeeterLevel * 1000); but_a1_0.Checked = voiceMeeter.Strips[0].A1; but_a2_0.Checked = voiceMeeter.Strips[0].A2; but_a3_0.Checked = voiceMeeter.Strips[0].A3; but_b1_0.Checked = voiceMeeter.Strips[0].B1; but_b2_0.Checked = voiceMeeter.Strips[0].B2; but_mute_0.Checked = voiceMeeter.Strips[0].Mute; but_mono_0.Checked = voiceMeeter.Strips[0].Mono; but_solo_0.Checked = voiceMeeter.Strips[0].Solo; } }
public VoiceMeeter GetVoiceMeeter() { VoiceMeeter result = new VoiceMeeter(); int busCount = 0; int stripCount = 0; //determine how to build the VoiceMeeter based on version; switch (GetVoiceMeeterType()) { case 1: //voicemeeter busCount = 2; stripCount = 3; break; case 2: //voicemeeter banana busCount = 5; stripCount = 5; break; } //get strips result.Strips = new Strip[stripCount]; for (int i = 0; i < stripCount; i++) { result.Strips[i] = GetStrip(i); } //get busses result.Busses = new Bus[busCount]; for (int i = 0; i < stripCount; i++) { result.Busses[i] = new Bus(); } return result; }
public JsonResult GetVoiceMeeter(string parameter) { VoiceMeeter result = VoiceMeeterConnector.Instance.GetVoiceMeeter(); return(Json(result)); }