Alright so I managed to get a sound test working (it totally dis-regards important errors right now, so don't use this please!).
https://gist.github.com/chebert/a501fc6c67b4ae406eb4
It's not working with Xlib yet (sound is super choppy) so that's next on the list. then at least enough error handling to re-start the sound for buffer over/under runs.
As to the playCursor writeCursor thing that casey does, I think that gets taken care of by ALSA? It seems like the
takes care of looping over the regions to write to.