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

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

Issue 1944883002: Move ADM Create() method to public interface. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Created 4 years, 7 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/modules/audio_device/test/func_test_manager.cc ('k') | no next file » | 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 211 matching lines...) Expand 10 before | Expand all | Expand 10 after
222 shared_->process_thread()->Start(); 222 shared_->process_thread()->Start();
223 } 223 }
224 224
225 // Create an internal ADM if the user has not added an external 225 // Create an internal ADM if the user has not added an external
226 // ADM implementation as input to Init(). 226 // ADM implementation as input to Init().
227 if (external_adm == nullptr) { 227 if (external_adm == nullptr) {
228 #if !defined(WEBRTC_INCLUDE_INTERNAL_AUDIO_DEVICE) 228 #if !defined(WEBRTC_INCLUDE_INTERNAL_AUDIO_DEVICE)
229 return -1; 229 return -1;
230 #else 230 #else
231 // Create the internal ADM implementation. 231 // Create the internal ADM implementation.
232 shared_->set_audio_device(AudioDeviceModuleImpl::Create( 232 shared_->set_audio_device(AudioDeviceModule::Create(
233 VoEId(shared_->instance_id(), -1), shared_->audio_device_layer())); 233 VoEId(shared_->instance_id(), -1), shared_->audio_device_layer()));
234 234
235 if (shared_->audio_device() == nullptr) { 235 if (shared_->audio_device() == nullptr) {
236 shared_->SetLastError(VE_NO_MEMORY, kTraceCritical, 236 shared_->SetLastError(VE_NO_MEMORY, kTraceCritical,
237 "Init() failed to create the ADM"); 237 "Init() failed to create the ADM");
238 return -1; 238 return -1;
239 } 239 }
240 #endif // WEBRTC_INCLUDE_INTERNAL_AUDIO_DEVICE 240 #endif // WEBRTC_INCLUDE_INTERNAL_AUDIO_DEVICE
241 } else { 241 } else {
242 // Use the already existing external ADM implementation. 242 // Use the already existing external ADM implementation.
(...skipping 573 matching lines...) Expand 10 before | Expand all | Expand 10 after
816 shared_->SetLastError(VE_CHANNEL_NOT_VALID, kTraceError, 816 shared_->SetLastError(VE_CHANNEL_NOT_VALID, kTraceError,
817 "AssociateSendChannel() failed to locate accociate_send_channel"); 817 "AssociateSendChannel() failed to locate accociate_send_channel");
818 return -1; 818 return -1;
819 } 819 }
820 820
821 channel_ptr->set_associate_send_channel(ch); 821 channel_ptr->set_associate_send_channel(ch);
822 return 0; 822 return 0;
823 } 823 }
824 824
825 } // namespace webrtc 825 } // namespace webrtc
OLDNEW
« no previous file with comments | « webrtc/modules/audio_device/test/func_test_manager.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698