added reference counting to audio waves