return (int)(size_t)(void*)pthread_self();
Ну и, конечно, это не работает со всеми версиями libc //_-
return (int)(size_t)(void*)pthread_self();
The general design for cubeb is to make each stream as lightweight as possible, so I've tried to avoid using a thread per stream. The current code will work for now, but longer term we'll want to move this to something where single (or pair) of worker threads handle all of the active streams.