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

Unified Diff: media/audio/win/waveout_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/win/audio_unified_win.cc ('k') | media/base/audio_bus.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/audio/win/waveout_output_win.cc
diff --git a/media/audio/win/waveout_output_win.cc b/media/audio/win/waveout_output_win.cc
index f42d94866b1c4f33788b7a982272e8c4241c926b..9b03c31cbd7cd93d7c6d6b6d5c344af5f44fb4cd 100644
--- a/media/audio/win/waveout_output_win.cc
+++ b/media/audio/win/waveout_output_win.cc
@@ -13,7 +13,6 @@
#include "base/debug/trace_event.h"
#include "base/logging.h"
#include "media/audio/audio_io.h"
-#include "media/audio/audio_util.h"
#include "media/audio/win/audio_manager_win.h"
namespace media {
@@ -360,14 +359,11 @@ void PCMWaveOutAudioOutputStream::QueueNextPacket(WAVEHDR *buffer) {
if (used <= buffer_size_) {
// 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_.Format.wBitsPerSample / 8, buffer->lpData);
buffer->dwBufferLength = used * format_.Format.nChannels / channels_;
- media::AdjustVolume(buffer->lpData, used,
- format_.Format.nChannels,
- format_.Format.wBitsPerSample >> 3,
- volume_);
} else {
HandleError(0);
return;
« no previous file with comments | « media/audio/win/audio_unified_win.cc ('k') | media/base/audio_bus.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698