Lines Matching refs:num_frames
82 void RingBuffer::Write(const float* samples, int num_frames) { in Write() argument
83 if (!num_frames) { in Write()
86 if (head_ + num_frames <= size_) { in Write()
88 num_frames * num_channels_ * sizeof(samples[0])); in Write()
89 head_ += num_frames; in Write()
94 head_ = num_frames - overhead; in Write()
98 head_logical_ += num_frames; in Write()
101 void RingBuffer::Copy(int reader, float* destination, int num_frames) const { in Copy()
103 if (pos + num_frames <= size_) { in Copy()
105 num_channels_ * num_frames * sizeof(destination[0])); in Copy()
110 int remaining = num_frames - wrapped; in Copy()
116 float* RingBuffer::GetPointer(int reader, int num_frames) { in GetPointer() argument
118 if (pos + num_frames <= size_) { in GetPointer()
121 if (num_frames > temp_read_buffer_size_) { in GetPointer()
122 temp_read_buffer_size_ = num_frames; in GetPointer()
127 Copy(reader, temp_read_buffer_, num_frames); in GetPointer()
132 void RingBuffer::MergeBack(int reader, const float* source, int num_frames) { in MergeBack() argument
138 if (pos + num_frames <= size_) { in MergeBack()
140 num_channels_ * num_frames * sizeof(source[0])); in MergeBack()
145 int remaining = num_frames - wrapped; in MergeBack()