Example #1
0
func CloseDevice() error {
	al.DeleteBuffers(hwa.buf.bufs)
	al.DeleteSources(hwa.source)
	al.CloseDevice()
	hwa = nil
	return nil
}
Example #2
0
// 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()
}