public void PlaySoundAsync() { //var sound = AudioSound.AddSound(FileNameBox.Text, WaveGraph.Slider1Value, WaveGraph.Slider2Value, (float)VolumeTrack.Value / 100); //return sound != null;// true if successfull if (Sound == null) { return; } AudioSound.PlaySound(Sound); }
private void PlayButton_Click(object sender, EventArgs e) { if (FileNameBox.Text == "") { MessageBox.Show("Enter a valid File to play!"); return; } AudioSound.PlaySound(Sound); //if (!PlaySoundAsync()) //{ // MessageBox.Show("Enter a valid File to play!"); // return; //} }