According to the wiki that will deadlock (see the second to last bullet in
remarks: http://wiki.libsdl.org/moin.fcg/SDL_OpenAudio).  I assume that the
audio lock is already held when the callback is called and that the lock is
just there to prevent the callback while you muck with things.
On Jul 13, 2013 8:47 AM, "Steve McCoy" <notifications@github.com> wrote:

In audiocallback.go:

> +package ui
> +
> +/*
> +#include <SDL/SDL.h>
> +#include <string.h>
> +
> +extern void *offset(void*, int);
> +*/
> +import "C"
> +
> +import (
> +	"unsafe"
> +)
> +
> +//export audioCallback
> +func audioCallback(_ unsafe.Pointer, dst *C.Uint8, sz C.int) {

Shouldn't this call SDL_LockAudio/UnlockAudio when accessing openedSpec and
playing?

—
Reply to this email directly or view it on
GitHub<https://github.com/velour/ui/pull/3/files#r5179292>
.