LoadWAV is a macro; cgo barfs on it (says it's undefined).  What I have
there is just the expansion of the macro.  It's annoying, but it works.
On Jul 13, 2013 8:46 AM, "Steve McCoy" <notifications@github.com> wrote:

> In audio.go:
>
> > +	path string
> > +	data unsafe.Pointer
> > +	len  uintptr
> > +}
> > +
> > +// Rb is a string of C.fopen flags (read and binary) for C.SDL_RWFromFile.
> > +var rb = C.CString("rb")
> > +
> > +func loadWAV(path string) (*audioData, error) {
> > +	cpath := C.CString(path)
> > +	defer C.free(unsafe.Pointer(cpath))
> > +
> > +	var data *C.Uint8
> > +	var len C.Uint32
> > +	var s C.SDL_AudioSpec // Apparently just a buffer?  SDL just zeroes it, fills it, and returns it.
> > +	spec := C.SDL_LoadWAV_RW(C.SDL_RWFromFile(cpath, rb), 1, &s, &data, &len)
>
> Why not just LoadWAV?
>
> —
> Reply to this email directly or view it on GitHub<https://github.com/velour/ui/pull/3/files#r5179290>
> .
>