Some more cleanups and fixing a linkage error for the get_xrun_delayed func that needs to be exported as a C function for clients.