func GenBuffers(n int) (buffers []*Buffer) { bufferIds := make([]C.ALuint, n) C.walGenBuffers(C.ALsizei(n), unsafe.Pointer(&bufferIds[0])) if GetError() != AlNoError { return } buffers = make([]*Buffer, n) for i, v := range bufferIds { b := new(Buffer) b.handle = v rememberBuffer(b) buffers[i] = b } return }
// NewBuffers() creates n fresh buffers. // Renamed, was GenBuffers. func NewBuffers(n int) (buffers []Buffer) { buffers = make([]Buffer, n) C.walGenBuffers(C.ALsizei(n), unsafe.Pointer(&buffers[0])) return }