public static void stopSong() { if (wavePlayer != null) { wavePlayer.Stop(); if (file != null) { file.Dispose(); file = null; } playing = false; } }