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

Unified Diff: trunk/src/media/audio/android/opensles_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/android/opensles_input.h ('k') | trunk/src/media/audio/audio_input_controller.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: trunk/src/media/audio/android/opensles_input.cc
===================================================================
--- trunk/src/media/audio/android/opensles_input.cc (revision 277811)
+++ trunk/src/media/audio/android/opensles_input.cc (working copy)
@@ -7,7 +7,6 @@
#include "base/debug/trace_event.h"
#include "base/logging.h"
#include "media/audio/android/audio_manager_android.h"
-#include "media/base/audio_bus.h"
#define LOG_ON_FAILURE_AND_RETURN(op, ...) \
do { \
@@ -28,8 +27,7 @@
simple_buffer_queue_(NULL),
active_buffer_index_(0),
buffer_size_bytes_(0),
- started_(false),
- audio_bus_(media::AudioBus::Create(params)) {
+ started_(false) {
DVLOG(2) << __PRETTY_FUNCTION__;
format_.formatType = SL_DATAFORMAT_PCM;
format_.numChannels = static_cast<SLuint32>(params.channels());
@@ -297,14 +295,13 @@
TRACE_EVENT0("audio", "OpenSLESOutputStream::ReadBufferQueue");
- // Convert from interleaved format to deinterleaved audio bus format.
- audio_bus_->FromInterleaved(audio_data_[active_buffer_index_],
- audio_bus_->frames(),
- format_.bitsPerSample / 8);
-
// TODO(henrika): Investigate if it is possible to get an accurate
// delay estimation.
- callback_->OnData(this, audio_bus_.get(), buffer_size_bytes_, 0.0);
+ callback_->OnData(this,
+ audio_data_[active_buffer_index_],
+ buffer_size_bytes_,
+ buffer_size_bytes_,
+ 0.0);
// Done with this buffer. Send it to device for recording.
SLresult err =
« no previous file with comments | « trunk/src/media/audio/android/opensles_input.h ('k') | trunk/src/media/audio/audio_input_controller.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698