diff --git a/openal/alcCore.go b/openal/alcCore.go index 519c1c9..36b4979 100644 --- a/openal/alcCore.go +++ b/openal/alcCore.go @@ -20,6 +20,8 @@ package openal //#cgo linux LDFLAGS: -lopenal //#cgo darwin LDFLAGS: -framework OpenAL +//#cgo openbsd CFLAGS: -I/usr/local/include +//#cgo openbsd LDFLAGS: -lopenal -L/usr/local/lib -lm //#include //#include //#include "local.h" @@ -111,7 +113,7 @@ type Device struct { } func (self *Device) getError() uint32 { - return uint32(C.alcGetError((*C.struct_ALCdevice_struct)(unsafe.Pointer(self.handle)))) + return uint32(C.alcGetError((*C.ALCdevice)(unsafe.Pointer(self.handle)))) } // Err() returns the most recent error generated @@ -147,8 +149,8 @@ func OpenDevice(name string) *Device { return &Device{uintptr((unsafe.Pointer)(h))} } -func (self *Device) cHandle() *C.struct_ALCdevice_struct { - return (*C.struct_ALCdevice_struct)(unsafe.Pointer(self.handle)) +func (self *Device) cHandle() *C.ALCdevice { + return (*C.ALCdevice)(unsafe.Pointer(self.handle)) } func (self *Device) CloseDevice() bool { @@ -268,8 +270,8 @@ type Context struct { // details). var NullContext Context -func (self *Context) cHandle() *C.struct_ALCcontext_struct { - return (*C.struct_ALCcontext_struct)(unsafe.Pointer(self.handle)) +func (self *Context) cHandle() *C.ALCcontext { + return (*C.ALCcontext)(unsafe.Pointer(self.handle)) } // Renamed, was MakeContextCurrent.