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

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

Issue 2750783004: Add mute state field to AudioFrame. (Closed)
Patch Set: Update new usages of AudioFrame::data_ Created 3 years, 6 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
« no previous file with comments | « webrtc/voice_engine/file_recorder.cc ('k') | webrtc/voice_engine/utility.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 918 matching lines...) Expand 10 before | Expand all | Expand 10 after
929 return -1; 929 return -1;
930 } 930 }
931 } 931 }
932 932
933 assert(_audioFrame.samples_per_channel_ == fileSamples); 933 assert(_audioFrame.samples_per_channel_ == fileSamples);
934 934
935 if (_mixFileWithMicrophone) 935 if (_mixFileWithMicrophone)
936 { 936 {
937 // Currently file stream is always mono. 937 // Currently file stream is always mono.
938 // TODO(xians): Change the code when FilePlayer supports real stereo. 938 // TODO(xians): Change the code when FilePlayer supports real stereo.
939 MixWithSat(_audioFrame.data_, 939 MixWithSat(_audioFrame.mutable_data(),
940 _audioFrame.num_channels_, 940 _audioFrame.num_channels_,
941 fileBuffer.get(), 941 fileBuffer.get(),
942 1, 942 1,
943 fileSamples); 943 fileSamples);
944 } else 944 } else
945 { 945 {
946 // Replace ACM audio with file. 946 // Replace ACM audio with file.
947 // Currently file stream is always mono. 947 // Currently file stream is always mono.
948 // TODO(xians): Change the code when FilePlayer supports real stereo. 948 // TODO(xians): Change the code when FilePlayer supports real stereo.
949 _audioFrame.UpdateFrame(-1, 949 _audioFrame.UpdateFrame(-1,
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after
1016 void TransmitMixer::EnableStereoChannelSwapping(bool enable) { 1016 void TransmitMixer::EnableStereoChannelSwapping(bool enable) {
1017 swap_stereo_channels_ = enable; 1017 swap_stereo_channels_ = enable;
1018 } 1018 }
1019 1019
1020 bool TransmitMixer::IsStereoChannelSwappingEnabled() { 1020 bool TransmitMixer::IsStereoChannelSwappingEnabled() {
1021 return swap_stereo_channels_; 1021 return swap_stereo_channels_;
1022 } 1022 }
1023 1023
1024 } // namespace voe 1024 } // namespace voe
1025 } // namespace webrtc 1025 } // namespace webrtc
OLDNEW
« no previous file with comments | « webrtc/voice_engine/file_recorder.cc ('k') | webrtc/voice_engine/utility.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698