The close() method of the AudioData interface clears all states and releases the reference to the media resource.
close()
MDN Reference