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

Unified Diff: media/audio/audio_low_latency_input_output_unittest.cc

Issue 344583002: Modifies AudioInputCallback::OnData and use media::AudioBus instead of plain byte vector (Relanding) (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Added extra non-pure OnData API 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 | « media/audio/audio_io.h ('k') | media/audio/cras/cras_input.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/audio/audio_low_latency_input_output_unittest.cc
diff --git a/media/audio/audio_low_latency_input_output_unittest.cc b/media/audio/audio_low_latency_input_output_unittest.cc
index 2ae700a874bd8d87b560418168c0570551c4b060..eefd3800aabd18800cc0011293e0dd8a3cce3530 100644
--- a/media/audio/audio_low_latency_input_output_unittest.cc
+++ b/media/audio/audio_low_latency_input_output_unittest.cc
@@ -184,7 +184,7 @@ class FullDuplexAudioSinkSource
// AudioInputStream::AudioInputCallback.
virtual void OnData(AudioInputStream* stream,
- const uint8* src, uint32 size,
+ const AudioBus* src,
uint32 hardware_delay_bytes,
double volume) OVERRIDE {
base::AutoLock lock(lock_);
@@ -203,14 +203,15 @@ class FullDuplexAudioSinkSource
++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 | « media/audio/audio_io.h ('k') | media/audio/cras/cras_input.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698