Fixed a bug where sound effects were incorrectly emitted when switching between sound and music