maddyblue / moggio

A multi-source music player in Go
ISC License
372 stars 24 forks source link

Dependency broken in go1.6: github.com/gordonklaus/portaudio #42

Closed shazow closed 8 years ago

shazow commented 8 years ago

Go 1.6 added restrictions for safer C pointer handling so it looks like the port audio dependency fails in 1.6:

panic: runtime error: cgo argument has Go pointer to Go pointer

goroutine 1 [running]:
panic(0x4292700, 0xc82012c0a0)
    /usr/local/Cellar/go/1.6/libexec/src/runtime/panic.go:464 +0x3e6
github.com/mjibson/mog/vendor/github.com/gordonklaus/portaudio._cgoCheckPointer1(0x4236b20, 0xc820138080, 0x0, 0x0, 0x0, 0x421b880)
    ??:0 +0x4d
github.com/mjibson/mog/vendor/github.com/gordonklaus/portaudio.OpenStream(0x0, 0x0, 0x0, 0xc820132120, 0x2, 0x120e9e0, 0x40e5888000000000, 0x400, 0x0, 0xc820185bd0, ...)
    /Users/shazow/local/go/src/github.com/mjibson/mog/vendor/github.com/gordonklaus/portaudio/portaudio.go:504 +0x3d1
github.com/mjibson/mog/vendor/github.com/gordonklaus/portaudio.OpenDefaultStream(0x0, 0x2, 0x40e5888000000000, 0x400, 0xc820185bd0, 0x1, 0x1, 0xc820140298, 0x0, 0x0)
    /Users/shazow/local/go/src/github.com/mjibson/mog/vendor/github.com/gordonklaus/portaudio/portaudio.go:538 +0x24a
github.com/mjibson/mog/output.get(0xac44, 0x2, 0x0, 0x0, 0x0, 0x0)
    /Users/shazow/local/go/src/github.com/mjibson/mog/output/port.go:22 +0x1ba
github.com/mjibson/mog/output.Get(0xac44, 0x2, 0x0, 0x0, 0x0, 0x0)
    /Users/shazow/local/go/src/github.com/mjibson/mog/output/output.go:22 +0x115
main.PlayPath(0x7fff5fbff9ee, 0x73, 0x4980000, 0xc82012c010, 0x0, 0x0)
maddyblue commented 8 years ago

Yup, already aware. I'm waiting on a fix from https://github.com/Orion90/portaudio

maddyblue commented 8 years ago

I'm also working on a libao branch: https://github.com/mjibson/mog/tree/libao

shazow commented 8 years ago

Ah very cool. I've been thinking of trying OpenAL for some stuff I'm doing but not sure it would give you the right amount of control for mog. libao looks like a good choice for desktop.