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

Unified Diff: media/audio/pulse/pulse_unified.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_output.cc ('k') | media/audio/win/audio_low_latency_output_win.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/audio/pulse/pulse_unified.cc
diff --git a/media/audio/pulse/pulse_unified.cc b/media/audio/pulse/pulse_unified.cc
index 791a3a89fe59e96869f985aa537514cdf7e505e8..87bb6ae0a18cb191298d01d88b5f52bc3b610906 100644
--- a/media/audio/pulse/pulse_unified.cc
+++ b/media/audio/pulse/pulse_unified.cc
@@ -8,7 +8,6 @@
#include "base/time.h"
#include "media/audio/audio_manager_base.h"
#include "media/audio/audio_parameters.h"
-#include "media/audio/audio_util.h"
#include "media/audio/pulse/pulse_util.h"
#include "media/base/seekable_buffer.h"
@@ -175,10 +174,9 @@ void PulseAudioUnifiedStream::WriteData(size_t requested_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.
+ output_bus_->Scale(volume_);
output_bus_->ToInterleaved(
output_bus_->frames(), params_.bits_per_sample() / 8, buffer);
- media::AdjustVolume(buffer, requested_bytes, params_.channels(),
- params_.bits_per_sample() / 8, volume_);
if (pa_stream_write(output_stream_, buffer, requested_bytes, NULL, 0LL,
PA_SEEK_RELATIVE) < 0) {
« no previous file with comments | « media/audio/pulse/pulse_output.cc ('k') | media/audio/win/audio_low_latency_output_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698