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

Unified Diff: media/audio/win/audio_low_latency_output_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/pulse/pulse_unified.cc ('k') | media/audio/win/audio_unified_win.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/audio/win/audio_low_latency_output_win.cc
diff --git a/media/audio/win/audio_low_latency_output_win.cc b/media/audio/win/audio_low_latency_output_win.cc
index b5a4c47da353c1fb9a8e35b1f22a7baa5fdb826f..04b5dd23721d50d9b5b1be3cfe223fc218003fc8 100644
--- a/media/audio/win/audio_low_latency_output_win.cc
+++ b/media/audio/win/audio_low_latency_output_win.cc
@@ -13,7 +13,6 @@
#include "base/metrics/histogram.h"
#include "base/utf_string_conversions.h"
#include "base/win/scoped_propvariant.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"
@@ -581,15 +580,10 @@ void WASAPIAudioOutputStream::RenderAudioFromSource(
// clipped and sanitized since it may come from an untrusted
// source such as NaCl.
const int bytes_per_sample = format_.Format.wBitsPerSample >> 3;
+ audio_bus_->Scale(volume_);
audio_bus_->ToInterleaved(
frames_filled, bytes_per_sample, audio_data);
- // Perform in-place, software-volume adjustments.
- media::AdjustVolume(audio_data,
- num_filled_bytes,
- audio_bus_->channels(),
- bytes_per_sample,
- volume_);
// Release the buffer space acquired in the GetBuffer() call.
// Render silence if we were not able to fill up the buffer totally.
« no previous file with comments | « media/audio/pulse/pulse_unified.cc ('k') | media/audio/win/audio_unified_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698