private void killPlayer(String filename)
    {
        synchronized(this) {
            if(musicPlayer != null && filename.contains("music/")) {
                musicPlayer.stop();
                musicPlayer = null;
            }
            else if(soundPlayer != null && filename.contains("sounds/")) {
            	soundPlayer.stop();
            	soundPlayer = null;
            }
        }
    }