stat.min_buffer = min(buffer_fill, stat.min_buffer);
stat.max_buffer = max(buffer_fill, stat.max_buffer);
if (buffer_fill >= buffer_size) { // oops, cpu was idle
// not really an error, but we'll warn for debugging purposes
stat.min_buffer = min(buffer_fill, stat.min_buffer);
stat.max_buffer = max(buffer_fill, stat.max_buffer);
if (buffer_fill >= buffer_size) { // oops, cpu was idle
// not really an error, but we'll warn for debugging purposes