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

Unified Diff: media/audio/win/audio_unified_win.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 | « media/audio/win/audio_low_latency_output_win.cc ('k') | media/audio/win/waveout_output_win.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/audio/win/audio_unified_win.cc
diff --git a/media/audio/win/audio_unified_win.cc b/media/audio/win/audio_unified_win.cc
index e7877f5165470b359b4aec5646375ded724187c7..59b98d04575c53dbead31b329650551ce92c287d 100644
--- a/media/audio/win/audio_unified_win.cc
+++ b/media/audio/win/audio_unified_win.cc
@@ -9,7 +9,6 @@
#include "base/debug/trace_event.h"
#include "base/time.h"
#include "base/win/scoped_com_initializer.h"
-#include "media/audio/audio_util.h"
#include "media/audio/win/audio_manager_win.h"
#include "media/audio/win/avrt_wrapper_win.h"
#include "media/audio/win/core_audio_util_win.h"
@@ -529,16 +528,10 @@ void WASAPIUnifiedStream::Run() {
// Convert the audio bus content to interleaved integer data using
// |audio_data| as destination.
+ render_bus_->Scale(volume_);
render_bus_->ToInterleaved(
packet_size_frames_, bytes_per_sample, audio_data);
- // Perform in-place, software-volume adjustments.
- media::AdjustVolume(audio_data,
- frames_filled * format_.Format.nBlockAlign,
- render_bus_->channels(),
- bytes_per_sample,
- volume_);
-
// Release the buffer space acquired in the GetBuffer() call.
audio_render_client_->ReleaseBuffer(packet_size_frames_, 0);
DLOG_IF(ERROR, FAILED(hr)) << "Failed to release render buffer";
« no previous file with comments | « media/audio/win/audio_low_latency_output_win.cc ('k') | media/audio/win/waveout_output_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698