krig / go-sox

libsox bindings for go
MIT License
135 stars 26 forks source link

FlowCallback uses unpinned pointer #22

Open fischerman opened 2 months ago

fischerman commented 2 months ago

The program

    start := time.Now()
    p.chain.FlowCallback(func(all_done bool) int {
        if start.Add(5 * time.Second).Before(time.Now()) {
            return sox.EOF
        }
        fmt.Printf(".")
        return sox.SUCCESS
    })

breaks with the panic panic: runtime error: cgo argument has Go pointer to unpinned Go pointer. I'm not familiar enough with cgo to understand what is going on.

As a workaround GODEBUG=cgocheck=0 can be set but it will probably lead to memory issues.

go version go1.23.1 linux/arm
krig commented 1 month ago

Hi! I haven't kept up with developments in Go, and this project has really not been active for a long time. I am going to archive this repository to avoid confusion, but feel free to fork if you use it and have a fix :)