OpenFileDialog dialog = new OpenFileDialog();
dialog.Filter = "Audio Files (.wav)|*.wav";


if(dialog.ShowDialog() == DialogResult.OK)
{
    string path = dialog.FileName;

playSound(path);

}

private void playSound(string path)
{
    System.Media.SoundPlayer player =  new System.Media.SoundPlayer();
    player.SoundLocation = path;
    player.Load();
    player.Play();
}

相关文章:

  • 2022-12-23
  • 2021-08-15
  • 2021-12-03
  • 2022-02-22
  • 2021-11-24
  • 2021-12-18
猜你喜欢
  • 2022-12-23
  • 2022-02-19
  • 2021-10-02
  • 2021-10-01
  • 2021-12-16
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案