| OLD | NEW |
| 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 178 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 189 } | 189 } |
| 190 | 190 |
| 191 // Create an internal ADM if the user has not added an external | 191 // Create an internal ADM if the user has not added an external |
| 192 // ADM implementation as input to Init(). | 192 // ADM implementation as input to Init(). |
| 193 if (external_adm == nullptr) { | 193 if (external_adm == nullptr) { |
| 194 #if !defined(WEBRTC_INCLUDE_INTERNAL_AUDIO_DEVICE) | 194 #if !defined(WEBRTC_INCLUDE_INTERNAL_AUDIO_DEVICE) |
| 195 return -1; | 195 return -1; |
| 196 #else | 196 #else |
| 197 // Create the internal ADM implementation. | 197 // Create the internal ADM implementation. |
| 198 shared_->set_audio_device(AudioDeviceModule::Create( | 198 shared_->set_audio_device(AudioDeviceModule::Create( |
| 199 VoEId(shared_->instance_id(), -1), shared_->audio_device_layer())); | 199 VoEId(shared_->instance_id(), -1), |
| 200 | 200 AudioDeviceModule::kPlatformDefaultAudio)); |
| 201 if (shared_->audio_device() == nullptr) { | 201 if (shared_->audio_device() == nullptr) { |
| 202 shared_->SetLastError(VE_NO_MEMORY, kTraceCritical, | 202 shared_->SetLastError(VE_NO_MEMORY, kTraceCritical, |
| 203 "Init() failed to create the ADM"); | 203 "Init() failed to create the ADM"); |
| 204 return -1; | 204 return -1; |
| 205 } | 205 } |
| 206 #endif // WEBRTC_INCLUDE_INTERNAL_AUDIO_DEVICE | 206 #endif // WEBRTC_INCLUDE_INTERNAL_AUDIO_DEVICE |
| 207 } else { | 207 } else { |
| 208 // Use the already existing external ADM implementation. | 208 // Use the already existing external ADM implementation. |
| 209 shared_->set_audio_device(external_adm); | 209 shared_->set_audio_device(external_adm); |
| 210 LOG_F(LS_INFO) | 210 LOG_F(LS_INFO) |
| (...skipping 556 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 767 shared_->SetLastError(VE_CHANNEL_NOT_VALID, kTraceError, | 767 shared_->SetLastError(VE_CHANNEL_NOT_VALID, kTraceError, |
| 768 "AssociateSendChannel() failed to locate accociate_send_channel"); | 768 "AssociateSendChannel() failed to locate accociate_send_channel"); |
| 769 return -1; | 769 return -1; |
| 770 } | 770 } |
| 771 | 771 |
| 772 channel_ptr->set_associate_send_channel(ch); | 772 channel_ptr->set_associate_send_channel(ch); |
| 773 return 0; | 773 return 0; |
| 774 } | 774 } |
| 775 | 775 |
| 776 } // namespace webrtc | 776 } // namespace webrtc |
| OLD | NEW |