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

Unified Diff: trunk/src/media/audio/audio_low_latency_input_output_unittest.cc

Issue 335343004: Revert 277794 "Modifies AudioInputCallback::OnData and use media..." (Closed) Base URL: svn://svn.chromium.org/chrome/
Patch Set: Created 6 years, 6 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
« no previous file with comments | « trunk/src/media/audio/audio_io.h ('k') | trunk/src/media/audio/cras/cras_input.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: trunk/src/media/audio/audio_low_latency_input_output_unittest.cc
===================================================================
--- trunk/src/media/audio/audio_low_latency_input_output_unittest.cc (revision 277811)
+++ trunk/src/media/audio/audio_low_latency_input_output_unittest.cc (working copy)
@@ -184,7 +184,7 @@
// AudioInputStream::AudioInputCallback.
virtual void OnData(AudioInputStream* stream,
- const AudioBus* src,
+ const uint8* src, uint32 size,
uint32 hardware_delay_bytes,
double volume) OVERRIDE {
base::AutoLock lock(lock_);
@@ -203,15 +203,14 @@
++input_elements_to_write_;
}
- // TODO(henrika): fix this and use AudioFifo instead.
// Store the captured audio packet in a seekable media buffer.
- // if (!buffer_->Append(src, size)) {
- // An attempt to write outside the buffer limits has been made.
- // Double the buffer capacity to ensure that we have a buffer large
- // enough to handle the current sample test scenario.
- // buffer_->set_forward_capacity(2 * buffer_->forward_capacity());
- // buffer_->Clear();
- // }
+ if (!buffer_->Append(src, size)) {
+ // An attempt to write outside the buffer limits has been made.
+ // Double the buffer capacity to ensure that we have a buffer large
+ // enough to handle the current sample test scenario.
+ buffer_->set_forward_capacity(2 * buffer_->forward_capacity());
+ buffer_->Clear();
+ }
}
virtual void OnError(AudioInputStream* stream) OVERRIDE {}
« no previous file with comments | « trunk/src/media/audio/audio_io.h ('k') | trunk/src/media/audio/cras/cras_input.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698