code: func (d *device) Close() {
  	if d.h != nil {
  		C.snd_pcm_drain(d.h)
  		C.snd_pcm_close(d.h)
  		d.h = nil
  	}
  	runtime.SetFinalizer(d, nil)
  }
docs: // Close closes a device and frees the resources associated with it.