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

Side by Side Diff: webrtc/voice_engine/transmit_mixer.cc

Issue 2750783004: Add mute state field to AudioFrame. (Closed)
Patch Set: don't return from Add() too early Created 3 years, 9 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 unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved. 2 * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved.
3 * 3 *
4 * Use of this source code is governed by a BSD-style license 4 * Use of this source code is governed by a BSD-style license
5 * that can be found in the LICENSE file in the root of the source 5 * that can be found in the LICENSE file in the root of the source
6 * tree. An additional intellectual property rights grant can be found 6 * tree. An additional intellectual property rights grant can be found
7 * in the file PATENTS. All contributing project authors may 7 * in the file PATENTS. All contributing project authors may
8 * be found in the AUTHORS file in the root of the source tree. 8 * be found in the AUTHORS file in the root of the source tree.
9 */ 9 */
10 10
(...skipping 970 matching lines...) Expand 10 before | Expand all | Expand 10 after
981 return -1; 981 return -1;
982 } 982 }
983 } 983 }
984 984
985 assert(_audioFrame.samples_per_channel_ == fileSamples); 985 assert(_audioFrame.samples_per_channel_ == fileSamples);
986 986
987 if (_mixFileWithMicrophone) 987 if (_mixFileWithMicrophone)
988 { 988 {
989 // Currently file stream is always mono. 989 // Currently file stream is always mono.
990 // TODO(xians): Change the code when FilePlayer supports real stereo. 990 // TODO(xians): Change the code when FilePlayer supports real stereo.
991 MixWithSat(_audioFrame.data_, 991 MixWithSat(_audioFrame.mutable_data(),
992 _audioFrame.num_channels_, 992 _audioFrame.num_channels_,
993 fileBuffer.get(), 993 fileBuffer.get(),
994 1, 994 1,
995 fileSamples); 995 fileSamples);
996 } else 996 } else
997 { 997 {
998 // Replace ACM audio with file. 998 // Replace ACM audio with file.
999 // Currently file stream is always mono. 999 // Currently file stream is always mono.
1000 // TODO(xians): Change the code when FilePlayer supports real stereo. 1000 // TODO(xians): Change the code when FilePlayer supports real stereo.
1001 _audioFrame.UpdateFrame(-1, 1001 _audioFrame.UpdateFrame(-1,
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after
1068 void TransmitMixer::EnableStereoChannelSwapping(bool enable) { 1068 void TransmitMixer::EnableStereoChannelSwapping(bool enable) {
1069 swap_stereo_channels_ = enable; 1069 swap_stereo_channels_ = enable;
1070 } 1070 }
1071 1071
1072 bool TransmitMixer::IsStereoChannelSwappingEnabled() { 1072 bool TransmitMixer::IsStereoChannelSwappingEnabled() {
1073 return swap_stereo_channels_; 1073 return swap_stereo_channels_;
1074 } 1074 }
1075 1075
1076 } // namespace voe 1076 } // namespace voe
1077 } // namespace webrtc 1077 } // namespace webrtc
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698