I try to play a sound from a Raspberry Pi 3 with Raspbian installed. I have mono installed. I tested it on Windows, and it runs well. But when running it on Raspbian. I don't get any error message and no sound either.
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 version
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