Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(691)

Unified Diff: media/base/audio_block_fifo.cc

Issue 396263004: Switch the input code to use AudioBlockFifo (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« media/base/audio_block_fifo.h ('K') | « media/base/audio_block_fifo.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/base/audio_block_fifo.cc
diff --git a/media/base/audio_block_fifo.cc b/media/base/audio_block_fifo.cc
index b8cecfa164e6890c5c4c1b2f838860d7da64a953..2916c3a058eb76e5be2b795c01614fadb58aeaa4 100644
--- a/media/base/audio_block_fifo.cc
+++ b/media/base/audio_block_fifo.cc
@@ -44,7 +44,8 @@ void AudioBlockFifo::Push(const void* source,
std::min(block_frames_ - write_pos_, frames_to_push);
// Deinterleave the content to the FIFO and update the |write_pos_|.
- current_block->FromInterleaved(source_ptr, push_frames, bytes_per_sample);
+ current_block->FromInterleavedPartial(source_ptr, write_pos_, push_frames,
DaleCurtis 2014/07/18 18:21:54 Whoops. Is this style clang-format approved?
no longer working on chromium 2014/07/21 15:13:30 Fixed.
+ bytes_per_sample);
write_pos_ = (write_pos_ + push_frames) % block_frames_;
if (!write_pos_) {
// The current block is completely filled, increment |write_block_| and
@@ -55,6 +56,7 @@ void AudioBlockFifo::Push(const void* source,
source_ptr += push_frames * bytes_per_sample * current_block->channels();
frames_to_push -= push_frames;
+ DCHECK_GE(frames_to_push, 0);
}
}
« media/base/audio_block_fifo.h ('K') | « media/base/audio_block_fifo.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698