The C library function initstate(), at least in macOS El Capitan, not only sets the state array given to it as the second argument, but also accesses the state array given to it in a previous call! (I don't know why, or if that behaviour is correct, but macOS seems to do that anyhow).
Therefore, we cannot pass a local variable to it. As soon as the player thread stops, it will be a dangling pointer, and when a new player thread is started afterwards, initstate() will dereference that dangling pointer with unforeseeable consequences.
// I think it's useful to keep this prime to prevent it from falling into a pattern with some
// other process.
- char rnstate[256];
+ static char rnstate[256];
initstate(time(NULL), rnstate, 256);
signed short *inbuf, *tbuf, *silence;