Fixed 2 sound-related crashes

- Fixed crash when trying to play a sound from a file that is currently
in use.
- Fixed crash when trying to play a sound whose format is not supported.