Chromium Code Reviews| Index: chromeos/audio/cras_audio_handler.cc |
| diff --git a/chromeos/audio/cras_audio_handler.cc b/chromeos/audio/cras_audio_handler.cc |
| index e4e35c44841d59d02148d2662d33dfffaf8fe9c1..37d80e618402510b08acb24e7cbe72eea648b398 100644 |
| --- a/chromeos/audio/cras_audio_handler.cc |
| +++ b/chromeos/audio/cras_audio_handler.cc |
| @@ -37,9 +37,9 @@ const int kMuteThresholdPercent = 1; |
| const int kHDMIRediscoverGracePeriodDurationInMs = 2000; |
| // Mixer matrix, [0.5, 0.5; 0.5, 0.5] |
| -const std::vector<double> kStereoToMono = {0.5, 0.5, 0.5, 0.5}; |
| +const double kStereoToMono[] = {0.5, 0.5, 0.5, 0.5}; |
| // Mixer matrix, [1, 0; 0, 1] |
| -const std::vector<double> kStereoToStereo = {1, 0, 0, 1}; |
| +const double kStereoToStereo[] = {1, 0, 0, 1}; |
| static CrasAudioHandler* g_cras_audio_handler = nullptr; |
| @@ -430,11 +430,17 @@ void CrasAudioHandler::SwapInternalSpeakerLeftRightChannel(bool swap) { |
| void CrasAudioHandler::SetOutputMono(bool mono_on) { |
| output_mono_on_ = mono_on; |
| if (mono_on) { |
| - chromeos::DBusThreadManager::Get()->GetCrasAudioClient()-> |
| - SetGlobalOutputChannelRemix(output_channels_, kStereoToMono); |
| + chromeos::DBusThreadManager::Get() |
| + ->GetCrasAudioClient() |
|
Lei Zhang
2017/04/18 21:35:51
BTW, this is clang-format rewriting code however i
jennyz
2017/04/18 21:46:13
Acknowledged.
|
| + ->SetGlobalOutputChannelRemix( |
| + output_channels_, |
| + std::vector<double>(kStereoToMono, std::end(kStereoToMono))); |
| } else { |
| - chromeos::DBusThreadManager::Get()->GetCrasAudioClient()-> |
| - SetGlobalOutputChannelRemix(output_channels_, kStereoToStereo); |
| + chromeos::DBusThreadManager::Get() |
| + ->GetCrasAudioClient() |
| + ->SetGlobalOutputChannelRemix( |
| + output_channels_, |
| + std::vector<double>(kStereoToStereo, std::end(kStereoToStereo))); |
| } |
| for (auto& observer : observers_) |