From 3ee84160f356ad78f48639b4e26eebee9a88b9c1 Mon Sep 17 00:00:00 2001 From: "fbarchard@chromium.org" Date: Wed, 4 Nov 2009 22:25:18 +0000 Subject: 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 --- media/audio/mac/audio_output_mac.cc | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) (limited to 'media/audio/mac/audio_output_mac.cc') 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(left_level); + volume_ = static_cast(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. -- cgit v1.1