Inconsistencies with SoundEffectInstance.Play/Stop between GL and DX12/VK

I’m having issues with the way SoundEffectInstances work on GL vs DX and VK. In my game, I had been using single SoundEffectInstances for sounds that I want to play on their own, so they don’t overlap. I basically called Stop() if the instance is playing, and then Play it. This works as expected on GL, but on DX12 and VK, the sounds inconsistenly cut out, and sometimes don’t even finish playing despite Play() being called.

In LoadContent:

_sound = Content.Load<SoundEffect>("sound").CreateInstance();

In Update:

if (Keyboard.GetState().IsKeyDown(Keys.Space))
{
if (_snd.State == SoundState.Playing)
_snd.Stop();
_snd.Play();
}

Also, MediaPlayer.Play is just not working at all in DX12. I’m on the latest release version for all libraries.

Might want to report on Github instead, it’s probably more likely to be noticed there. But I’d recommend waiting until the DX12 and Vulkan implementations are officially declared ready before using them for anything you intend to eventually publish. There appears to be a large number of bugs and inconsistencies left to iron out still.

1 Like

That’s a shame, the documentation makes it seem like they’re the better options to pick. The official ‘getting started’ tutorial uses DX12 and VK. I might make a github issue, but having to build the latest dev build seems like a pain.