My Windows 10 sound keeps crashing at random times, how do I prevent this?

Like when I try to play Minecraft, when I try to record audio and sometimes for no reason at all sound stops being audible! It either requires a restart or you have to wait for couple hours but it's freaking annoying, how do I prevent sound crash?!

If you make the upgrade to windows 10…( still bug and glitch filled ). You may have to reinstall your sound card and video card drivers… As well as reinstall the game itself…