made RingBuffer thread safe!

Tested with 14 hours of continuous playback #77