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.