func CloseDevice() error { al.DeleteBuffers(hwa.buf.bufs) al.DeleteSources(hwa.source) al.CloseDevice() hwa = nil return nil }
// DestroyKey cleans up any resources for the key when destorying the key. func (k *PianoKey) DestroyKey(glctx gl.Context) { glctx.DeleteBuffer(k.glBuf) al.DeleteSources(k.soundSources...) al.DeleteBuffers(k.soundBuffers) al.CloseDevice() }