【发布时间】:2014-03-02 04:32:55
【问题描述】:
System.Media.SoundPlayer 是否可能无法播放 c:\Windows\Media 中的 Windows 系统声音??
我有代码:
using (var soundPlayer =
new SoundPlayer(@"c:\Windows\Media\Landscape\Windows Notify.wav"))
{
soundPlayer.Play();
}
然而,当我运行这段代码时,我得到了错误:
Sound API only supports playing PCM wave files.
我错过了什么吗?有没有办法从 WPF 应用程序播放这些文件? (不将它们转换为 PCM)
【问题讨论】: