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

Unified Diff: media/audio/android/opensles_output.cc

Issue 13726011: Add vector_math::FMUL. Replace audio_util::AdjustVolume. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix volume == 1 case. Created 7 years, 8 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 | « no previous file | media/audio/audio_util.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/audio/android/opensles_output.cc
diff --git a/media/audio/android/opensles_output.cc b/media/audio/android/opensles_output.cc
index f98baaf9235b48613411daceb9250383360e453e..36a1408027eccc29ebc1d151648f23b973a48e9a 100644
--- a/media/audio/android/opensles_output.cc
+++ b/media/audio/android/opensles_output.cc
@@ -5,7 +5,6 @@
#include "media/audio/android/opensles_output.h"
#include "base/logging.h"
-#include "media/audio/audio_util.h"
#include "media/audio/android/audio_manager_android.h"
namespace media {
@@ -267,16 +266,10 @@ void OpenSLESOutputStream::FillBufferQueue() {
DCHECK_LE(static_cast<size_t>(num_filled_bytes), buffer_size_bytes_);
// Note: If this ever changes to output raw float the data must be clipped and
// sanitized since it may come from an untrusted source such as NaCl.
+ audio_bus_->Scale(volume_);
audio_bus_->ToInterleaved(
frames_filled, format_.bitsPerSample / 8, audio_data_[active_queue_]);
- // Perform in-place, software-volume adjustments.
- media::AdjustVolume(audio_data_[active_queue_],
- num_filled_bytes,
- format_.numChannels,
- format_.bitsPerSample / 8,
- volume_);
-
// Enqueue the buffer for playback.
SLresult err = (*simple_buffer_queue_)->Enqueue(
simple_buffer_queue_,
« no previous file with comments | « no previous file | media/audio/audio_util.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698