// Open opens a new device in the OpenAL layer. func Open(name string) *Device { n := C.CString(name) defer C.free(unsafe.Pointer(n)) return &Device{d: C.alcOpenDevice((*C.ALCchar)(unsafe.Pointer(n)))} }
func alcOpenDevice(name string) unsafe.Pointer { n := C.CString(name) defer C.free(unsafe.Pointer(n)) return (unsafe.Pointer)(C.alcOpenDevice((*C.ALCchar)(unsafe.Pointer(n)))) }
func OpenDevice(name string) *Device { var s *C.ALCchar s = alcString(name) defer freeString(s) return (*Device)(C.alcOpenDevice(s)) }
func OpenDevice(deviceName string) (Device, error) { return Device{C.alcOpenDevice((*C.ALCchar)(C.CString(deviceName)))}, GetError() }