func CreateSample(buf unsafe.Pointer, samples, freq, depth, chanConf uint32, freeBuf bool) *Sample { return (*Sample)(unsafe.Pointer(C.al_create_sample(buf, C.uint(samples), C.uint(freq), C.ALLEGRO_AUDIO_DEPTH(depth), C.ALLEGRO_CHANNEL_CONF(chanConf), C.bool(freeBuf)))) }
func createSample(data []byte, samples uint, freq uint, depth AudioDepth, chan_conf ChannelConf) *C.ALLEGRO_SAMPLE { // don't let allegro free the data, it's owned by Go. // XXX: copy data here in stead of using the go data??? return C.al_create_sample(unsafe.Pointer(&data[0]), C.uint(samples), C.uint(freq), depth.toC(), chan_conf.toC(), b2cb(false)) }