Rework usage of activeSounds.

Change to a idArray and properly initialize the members to prevent undefined behavior