I cannot get SoundEffect to work on Windows platform (Windows 10, VS15). Song is working fine. It looks like it’s loaded fine by content loader but then not played. No exceptions are thrown.
When debugging with MonoGame project loaded I can see XAudio2 Device is not initialized which means no SoundEffect can be played. These are the lines, both Device creation lines are throwing exceptions, later caught by catch.
SoundEffect.XAudio.cs : Line 86
if (Device == null)
{
#if !WINRT && DEBUG
try
{
//Fails if the XAudio2 SDK is not installed
Device = new XAudio2(XAudio2Flags.DebugEngine, ProcessorSpecifier.DefaultProcessor);
Device.StartEngine();
}
catch
#endif
{
Device = new XAudio2(XAudio2Flags.None, ProcessorSpecifier.DefaultProcessor);
Device.StartEngine();
}
}
Could it be some prerequisites problem? Also not sure if it is MonoGame or SharpDX issue.
EDIT : Tried it with different Audio devices and Desktop PC and sound still doesn’t work. Here is the exception that I got from SharpDX library when trying to create Device.
Message “HRESULT: [0x80040154], Module: [Unknown], ApiCode: [Unknown/Unknown], Message: Class not registered\r\n” string