First tweak, affects our ficus client when it is idle.  It will behave like a circular ringbuffer, discarding the oldest data when the input queue is full.
The capture thread will now only run if we are actively capturing.
No more idle cpu cycles waiting for things to happen.
Added a waiting mechanism for the playback threads using condition variables.
This commit drops cpu load below 100%, but some residual bottle-necking occurs during the last couple
seconds of playback of non-looping samples.
Stabilized the cpu quite a lot, but still not where I want it.  "ficus_ramptest" is down from a mountain-peaking CPU behavior of 70%max to a stable 14-16%.
Still not completely satisfied, the investigation continues.
process() callback optimizations, formatting
Made sure we don't waste time in our process() callback using the capture thread's state-checking from previous commits and only do any audio processing if we can.
Formatted some 'if' statements.
Miscellaneous nitpicks
Optimized how we clear out audio buffers of retriggered audio
Experimented with code performance moving instructions around in disk_thread()
Fixed capture-related regression
Audio capture wasn't working, fixed that.
Made tests more telling of functionality.
100%+ CPU spike still haunting capturing audio, need to fix
Forgot to add these with the last commit.
rtqueue wait mechanism and libficus formatting cleanup
Replaced empty while-loop waits in rtqueue.h with condition-variable wait mechanisms, capture CPU% is now within acceptable thesholds.
Formatting and debug statement removal in libficus.c.