Lines Matching refs:buffer
21 // when the buffer timestamps are slightly off because of timestamp rounding
28 const scoped_refptr<AudioBuffer> buffer,
30 buffer->TrimStart(frames_to_trim);
31 buffer->set_timestamp(timestamp_helper.GetTimestamp());
34 // Returns an AudioBus whose frame buffer is backed by the provided AudioBuffer.
36 const scoped_refptr<AudioBuffer>& buffer) {
38 AudioBus::CreateWrapper(buffer->channel_count());
39 wrapper->set_frames(buffer->frame_count());
40 for (int ch = 0; ch < buffer->channel_count(); ++ch) {
42 ch, reinterpret_cast<float*>(buffer->channel_data()[ch]));
60 // Adds a new buffer full of samples or end of stream buffer to the splicer.
61 // Returns true if the buffer was accepted. False is returned if an error
65 // Returns true if the sanitizer has a buffer to return.
68 // Removes the next buffer from the output buffer queue and returns it; should
80 // |output| sanitizer fails for any buffer removed from |this|.
84 void AddOutputBuffer(const scoped_refptr<AudioBuffer>& buffer);
159 // Create a buffer with enough silence samples to fill the gap and
160 // add it to the output buffer.
169 // Add the input buffer now that the gap has been filled.
178 // A crossfade can't be done here because only the current buffer is available
185 DVLOG(1) << "Dropping whole buffer";
190 // into a new buffer. Add this new buffer to the output queue.
210 const scoped_refptr<AudioBuffer>& buffer) {
211 output_timestamp_helper_.AddFrames(buffer->frame_count());
212 output_buffers_.push_back(buffer);
217 for (const auto& buffer : output_buffers_)
218 frame_count += buffer->frame_count();
264 // If the provided buffer is entirely before the splice point it can also be
271 // If we've encountered the first pre splice buffer, reset the pre splice
283 // The first post splice buffer is expected to match |splice_timestamp_|.
396 // We don't know the channel count until we see the first buffer, so wait
397 // until the first buffer to allocate the output AudioBus.
401 // Allocate output buffer for crossfade.
410 // entire buffer exists before the splice point.
428 // If only part of the buffer was consumed, trim it appropriately and stick
454 // or overlaps to process when adding the buffer to |output_sanitizer_|.
475 // If only part of the buffer was consumed, save it for after we've added
476 // the crossfade buffer