summaryrefslogtreecommitdiffstats
path: root/media/audio/mac/audio_output_mac.cc
diff options
context:
space:
mode:
authorfbarchard@chromium.org <fbarchard@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-11-04 22:25:18 +0000
committerfbarchard@chromium.org <fbarchard@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-11-04 22:25:18 +0000
commit3ee84160f356ad78f48639b4e26eebee9a88b9c1 (patch)
tree41cdcce0762674b9eb5893d0585673d91bea53e2 /media/audio/mac/audio_output_mac.cc
parent3da33567fb3c69351d74ccb11d884e4ea9f9a21e (diff)
downloadchromium_src-3ee84160f356ad78f48639b4e26eebee9a88b9c1.zip
chromium_src-3ee84160f356ad78f48639b4e26eebee9a88b9c1.tar.gz
chromium_src-3ee84160f356ad78f48639b4e26eebee9a88b9c1.tar.bz2
SetVolume and GetVolume take one volume instead of separate left and right volumes.
BUG=26660 TEST=no visible difference. Make sure volume still works. Code size should go down marginally. Review URL: http://codereview.chromium.org/357004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@31018 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'media/audio/mac/audio_output_mac.cc')
-rw-r--r--media/audio/mac/audio_output_mac.cc13
1 files changed, 5 insertions, 8 deletions
diff --git a/media/audio/mac/audio_output_mac.cc b/media/audio/mac/audio_output_mac.cc
index 42e80a1..24dc86b 100644
--- a/media/audio/mac/audio_output_mac.cc
+++ b/media/audio/mac/audio_output_mac.cc
@@ -146,25 +146,22 @@ void PCMQueueOutAudioOutputStream::Stop() {
HandleError(err);
}
-void PCMQueueOutAudioOutputStream::SetVolume(double left_level,
- double ) {
+void PCMQueueOutAudioOutputStream::SetVolume(double volume) {
if (!audio_queue_)
return;
- volume_ = static_cast<float>(left_level);
+ volume_ = static_cast<float>(volume);
OSStatus err = AudioQueueSetParameter(audio_queue_,
kAudioQueueParam_Volume,
- left_level);
+ volume);
if (err != noErr) {
HandleError(err);
}
}
-void PCMQueueOutAudioOutputStream::GetVolume(double* left_level,
- double* right_level) {
+void PCMQueueOutAudioOutputStream::GetVolume(double* volume) {
if (!audio_queue_)
return;
- *left_level = volume_;
- *right_level = volume_;
+ *volume = volume_;
}
// Reorder PCM from AAC layout to Core Audio layout.