private void Form1_Load(object sender, EventArgs e) { player = new SoundPlayer(playListSongNamesR[0]); // Create a sample listener and controller //SampleListener listener = new SampleListener(listBox1); controller = new Controller(); //soundEffectsLibrary musicPlayer = new irrKlangClass(playListSongNamesR[0], playListSongNamesR.Length); playListR.Items.AddRange(playListSongNamesR); playListR.SelectedIndex = playListR.FindString(playListSongNamesR[musicPlayer.getTrackCurrentlyPlaying()]); // Have the sample listener receive events from the controller controller.AddListener(musicPlayer); }
private void timer1_Tick(object sender, EventArgs e) { //RIGHT HAND FUNCTIONS///////////////////////////////////////////////////////////////////////////////// //OnOffSwitch if (musicPlayer.getIsPlaying() == false) { onOffLabelR.BackColor = Color.Red;//off } else { Bitmap bitmap = (Bitmap)discR.Image; discR.Image = (Bitmap)(RotateImageByAngle(discR.Image, 5)); onOffLabelR.BackColor = Color.LightGreen;//on } //Distortion if (musicPlayer.getDistortionOnOff() == false) { distortionLabelR.BackColor = Color.Red;//off } else { distortionLabelR.BackColor = Color.LightGreen;//on } //reverb if (musicPlayer.getReverbOnOff() == false) { reverbLabelR.BackColor = Color.Red;//off } else { reverbLabelR.BackColor = Color.LightGreen;//on } //echo if (musicPlayer.getEchoOnOff() == false) { echoLabelR.BackColor = Color.Red;//off } else { echoLabelR.BackColor = Color.LightGreen;//on } //gargle if (musicPlayer.getGargleOnOff() == false) { gargleLabelR.BackColor = Color.Red;//off } else { gargleLabelR.BackColor = Color.LightGreen;//on } //Right Volume Labels volumeLabelR.Text = Convert.ToString(musicPlayer.GetVolume()); float rightValue = Convert.ToSingle(volumeLabelR.Text); rightValue = rightValue * 100; volumeBarR.Value = Convert.ToInt32(rightValue); //playlist int currentSong = musicPlayer.getTrackCurrentlyPlaying(); playListR.SelectedIndex = playListR.FindString(playListSongNamesR[currentSong]); musicPlayer.setFileName(playListSongNamesR[musicPlayer.getTrackCurrentlyPlaying()]); }