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

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

Issue 1702983002: Replace scoped_ptr with unique_ptr in webrtc/voice_engine/ (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Created 4 years, 10 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/transmit_mixer.h ('k') | webrtc/voice_engine/voe_codec_unittest.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
11 #include "webrtc/voice_engine/transmit_mixer.h" 11 #include "webrtc/voice_engine/transmit_mixer.h"
12 12
13 #include <memory>
14
13 #include "webrtc/base/format_macros.h" 15 #include "webrtc/base/format_macros.h"
14 #include "webrtc/base/logging.h" 16 #include "webrtc/base/logging.h"
15 #include "webrtc/modules/utility/include/audio_frame_operations.h" 17 #include "webrtc/modules/utility/include/audio_frame_operations.h"
16 #include "webrtc/system_wrappers/include/event_wrapper.h" 18 #include "webrtc/system_wrappers/include/event_wrapper.h"
17 #include "webrtc/system_wrappers/include/trace.h" 19 #include "webrtc/system_wrappers/include/trace.h"
18 #include "webrtc/voice_engine/channel.h" 20 #include "webrtc/voice_engine/channel.h"
19 #include "webrtc/voice_engine/channel_manager.h" 21 #include "webrtc/voice_engine/channel_manager.h"
20 #include "webrtc/voice_engine/include/voe_external_media.h" 22 #include "webrtc/voice_engine/include/voe_external_media.h"
21 #include "webrtc/voice_engine/statistics.h" 23 #include "webrtc/voice_engine/statistics.h"
22 #include "webrtc/voice_engine/utility.h" 24 #include "webrtc/voice_engine/utility.h"
(...skipping 1150 matching lines...) Expand 10 before | Expand all | Expand 10 after
1173 "failed"); 1175 "failed");
1174 return -1; 1176 return -1;
1175 } 1177 }
1176 1178
1177 return 0; 1179 return 0;
1178 } 1180 }
1179 1181
1180 int32_t TransmitMixer::MixOrReplaceAudioWithFile( 1182 int32_t TransmitMixer::MixOrReplaceAudioWithFile(
1181 int mixingFrequency) 1183 int mixingFrequency)
1182 { 1184 {
1183 rtc::scoped_ptr<int16_t[]> fileBuffer(new int16_t[640]); 1185 std::unique_ptr<int16_t[]> fileBuffer(new int16_t[640]);
1184 1186
1185 size_t fileSamples(0); 1187 size_t fileSamples(0);
1186 { 1188 {
1187 rtc::CritScope cs(&_critSect); 1189 rtc::CritScope cs(&_critSect);
1188 if (_filePlayerPtr == NULL) 1190 if (_filePlayerPtr == NULL)
1189 { 1191 {
1190 WEBRTC_TRACE(kTraceWarning, kTraceVoice, 1192 WEBRTC_TRACE(kTraceWarning, kTraceVoice,
1191 VoEId(_instanceId, -1), 1193 VoEId(_instanceId, -1),
1192 "TransmitMixer::MixOrReplaceAudioWithFile()" 1194 "TransmitMixer::MixOrReplaceAudioWithFile()"
1193 "fileplayer doesnot exist"); 1195 "fileplayer doesnot exist");
(...skipping 134 matching lines...) Expand 10 before | Expand all | Expand 10 after
1328 void TransmitMixer::EnableStereoChannelSwapping(bool enable) { 1330 void TransmitMixer::EnableStereoChannelSwapping(bool enable) {
1329 swap_stereo_channels_ = enable; 1331 swap_stereo_channels_ = enable;
1330 } 1332 }
1331 1333
1332 bool TransmitMixer::IsStereoChannelSwappingEnabled() { 1334 bool TransmitMixer::IsStereoChannelSwappingEnabled() {
1333 return swap_stereo_channels_; 1335 return swap_stereo_channels_;
1334 } 1336 }
1335 1337
1336 } // namespace voe 1338 } // namespace voe
1337 } // namespace webrtc 1339 } // namespace webrtc
OLDNEW
« no previous file with comments | « webrtc/voice_engine/transmit_mixer.h ('k') | webrtc/voice_engine/voe_codec_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698