Exemple #1
0
// 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)))}
}
Exemple #2
0
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))))
}
Exemple #3
0
func OpenDevice(name string) *Device {
	var s *C.ALCchar
	s = alcString(name)
	defer freeString(s)
	return (*Device)(C.alcOpenDevice(s))
}
Exemple #4
0
func OpenDevice(deviceName string) (Device, error) {
	return Device{C.alcOpenDevice((*C.ALCchar)(C.CString(deviceName)))}, GetError()
}