This fixes a segmentation fault that was happening in the Music class' destructor. Basically, when stop() is called in the destructor, the mutex used by the SoundStream has already been finalized and bad things happen when we try to lock the mutex.
I don't think we need to call stop() in the destructor because it only resets a couple of variables on top of what the SoundStream destructor already does.
This fixes a segmentation fault that was happening in the Music class' destructor. Basically, when
stop()
is called in the destructor, the mutex used by theSoundStream
has already been finalized and bad things happen when we try to lock the mutex.I don't think we need to call
stop()
in the destructor because it only resets a couple of variables on top of what theSoundStream
destructor already does.