1

尝试运行简单的音频播放器后,我收到此错误:

System.UriFormatException: Invalid URI: The format of the URI could not be determined.

这是我的代码:

using System;
namespace PurePlayer
{
class MainClass
{
    public static void Main(string[] args)
    {

        System.Media.SoundPlayer player = new System.Media.SoundPlayer("~/Desktop/audio.wav");
        player.Load();
        player.Play();
    }
}
}

请帮我弄清楚为什么音频不会播放。

仅供参考,我正在运行 OSX

4

0 回答 0