Create a state machine for soundmanager