There shouldn't be a problem - there's only one thread which does audio decoding, and so only one thread which calls write.

The head twiddling isn't protected as that is the only place the head pointer is twiddled, and with only one writer should be safe (famous last words!)

Hugo