summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorhenrika@chromium.org <henrika@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-12-17 12:20:35 +0000
committerhenrika@chromium.org <henrika@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-12-17 12:20:35 +0000
commitd91adf2effda046b5772b031440377ec4c26b060 (patch)
tree5fd0d7814ad444ff9c9a797ee9bf9047d86c420c
parent42c45cbf07802088bbb2c4e7839cebe47380cb59 (diff)
downloadchromium_src-d91adf2effda046b5772b031440377ec4c26b060.zip
chromium_src-d91adf2effda046b5772b031440377ec4c26b060.tar.gz
chromium_src-d91adf2effda046b5772b031440377ec4c26b060.tar.bz2
Setting audio volume is no longer ignored on low latency audio path for Mac.
Note that Mac is (was) the only platform that did not use the volume level for the low-latency output path. This discrepancy is now removed. This change should not affect the audio/video tag or any other audio client as far as I can tell. TBR=dalecurtis BUG=166394 TEST=Run this https://code.google.com/p/webrtc-samples/source/browse/trunk/demos/html/local-audio-rendering.html on Mac and verify that volume settings works. Also executed: media_unittests Review URL: https://codereview.chromium.org/11591013 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@173452 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r--media/audio/mac/audio_low_latency_output_mac.cc7
1 files changed, 7 insertions, 0 deletions
diff --git a/media/audio/mac/audio_low_latency_output_mac.cc b/media/audio/mac/audio_low_latency_output_mac.cc
index 88891e2..25c9d4e0c 100644
--- a/media/audio/mac/audio_low_latency_output_mac.cc
+++ b/media/audio/mac/audio_low_latency_output_mac.cc
@@ -286,6 +286,13 @@ OSStatus AUAudioOutputStream::Render(UInt32 number_of_frames,
frames_filled, format_.mBitsPerChannel / 8, audio_data);
uint32 filled = frames_filled * format_.mBytesPerFrame;
+ // Perform in-place, software-volume adjustments.
+ media::AdjustVolume(audio_data,
+ filled,
+ audio_bus_->channels(),
+ format_.mBitsPerChannel / 8,
+ volume_);
+
// Handle channel order for 5.1 audio.
// TODO(dalecurtis): Channel downmixing, upmixing, should be done in mixer;
// volume adjust should use SSE optimized vector_fmul() prior to interleave.