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

Unified Diff: trunk/src/media/audio/alsa/alsa_input.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/alsa/alsa_input.h ('k') | trunk/src/media/audio/android/audio_android_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: trunk/src/media/audio/alsa/alsa_input.cc
===================================================================
--- trunk/src/media/audio/alsa/alsa_input.cc (revision 277811)
+++ trunk/src/media/audio/alsa/alsa_input.cc (working copy)
@@ -43,9 +43,7 @@
mixer_handle_(NULL),
mixer_element_handle_(NULL),
read_callback_behind_schedule_(false),
- audio_bus_(AudioBus::Create(params)),
- weak_factory_(this) {
-}
+ weak_factory_(this) {}
AlsaPcmInputStream::~AlsaPcmInputStream() {}
@@ -210,11 +208,8 @@
int frames_read = wrapper_->PcmReadi(device_handle_, audio_buffer_.get(),
params_.frames_per_buffer());
if (frames_read == params_.frames_per_buffer()) {
- audio_bus_->FromInterleaved(audio_buffer_.get(),
- audio_bus_->frames(),
- params_.bits_per_sample() / 8);
- callback_->OnData(
- this, audio_bus_.get(), hardware_delay_bytes, normalized_volume);
+ callback_->OnData(this, audio_buffer_.get(), bytes_per_buffer_,
+ hardware_delay_bytes, normalized_volume);
} else {
LOG(WARNING) << "PcmReadi returning less than expected frames: "
<< frames_read << " vs. " << params_.frames_per_buffer()
« no previous file with comments | « trunk/src/media/audio/alsa/alsa_input.h ('k') | trunk/src/media/audio/android/audio_android_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698