+ if (write_offset < 0 || (write_offset + frames_to_copy) > _allocated_frames) {
+ throw ProgrammingError(
+ __FILE__, __LINE__,
+ String::compose("frames_to_copy=%1, read_offset=%2, write_offset=%3", frames_to_copy, read_offset, write_offset)
+ );
+ }