コード例 #1
0
ファイル: alsa.go プロジェクト: charneykaye/goalsa
// Close closes a device and frees the resources associated with it.
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)
}
コード例 #2
0
ファイル: alsa.go プロジェクト: wendal/alsa-go
// Close closes stream and release the handler.
func (handle *Handle) Close() {
	C.snd_pcm_close(handle.cHandle)
}