Lines Matching refs:frames
31 // Update the |frames_| counter since we have added frames.
36 int AudioBufferQueue::ReadFrames(int frames,
39 DCHECK_GE(dest->frames(), frames + dest_frame_offset);
40 return InternalRead(frames, true, 0, dest_frame_offset, dest);
43 int AudioBufferQueue::PeekFrames(int frames,
47 DCHECK_GE(dest->frames(), frames);
49 frames, false, source_frame_offset, dest_frame_offset, dest);
52 void AudioBufferQueue::SeekFrames(int frames) {
54 CHECK_LE(frames, frames_);
55 int taken = InternalRead(frames, true, 0, 0, NULL);
56 DCHECK_EQ(taken, frames);
59 int AudioBufferQueue::InternalRead(int frames,
64 // Counts how many frames are actually read from the buffer queue.
70 while (taken < frames) {
82 // If there are frames to skip, do it first. May need to skip into
89 // more than |frames| frames in total and each single step copies no more
91 int copied = std::min(frames - taken, remaining_frames_in_buffer);
99 // Increase total number of frames copied, which regulates when to end
103 // We have read |copied| frames from the current buffer. Advance the
122 // Update the appropriate values since |taken| frames have been copied out.