Better locking for sound effects.
Should also fix a sporadic crash when exiting the game.