单声道c#SoundPlayer不';行不通
我尝试播放安装了Raspbian的Raspberry Pi 3的声音。我已经安装了mono。我在Windows上测试了它,它运行得很好。但在拉斯宾身上运行时。我没有收到任何错误信息,也没有声音单声道c#SoundPlayer不';行不通,c#,mono,raspberry-pi,raspbian,playsound,C#,Mono,Raspberry Pi,Raspbian,Playsound,我尝试播放安装了Raspbian的Raspberry Pi 3的声音。我已经安装了mono。我在Windows上测试了它,它运行得很好。但在拉斯宾身上运行时。我没有收到任何错误信息,也没有声音 public void PlaySound() { try { using (var file = new FileStream("example.wav", FileMode.Open, FileAccess.Read, FileShare.Rea
public void PlaySound()
{
try
{
using (var file = new FileStream("example.wav",
FileMode.Open, FileAccess.Read, FileShare.Read))
{
var player = new SoundPlayer(file);
player.PlaySync();
}
}
catch (Exception e)
{
Console.WriteLine("Sound failed to play");
}
}
单声道版本
Mono JIT compiler version 3.2.8 (Debian 3.2.8+dfsg-10)
Copyright (C) 2002-2014 Novell, Inc, Xamarin Inc and Contributors. www.mono-project.com
TLS: __thread
SIGSEGV: normal
Notifications: epoll
Architecture: armel,vfp+hard
Disabled: none
Misc: softdebug
LLVM: supported, not enabled.
GC: sgen
将此问题报告给Mono,看看他们是否可以向您展示如何调试。Mono的非Windows声音基于Alsa(
Alsa utils
),因此,如果不能正常工作,Mono也不会。。。有很多关于在Rassies上安装和测试Alsa的博客文章,即。