kill the thread before calling waveOutReset() to fix random crashing when shutting down
Merge pull request #2 from tv-s/master

WinMM: fix random crashing when shutting down