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 579 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
590 if (!shared_->audio_device()->Recording()) { | 590 if (!shared_->audio_device()->Recording()) { |
591 if (shared_->audio_device()->StartRecording() != 0) { | 591 if (shared_->audio_device()->StartRecording() != 0) { |
592 LOG_F(LS_ERROR) << "Failed to start recording"; | 592 LOG_F(LS_ERROR) << "Failed to start recording"; |
593 return -1; | 593 return -1; |
594 } | 594 } |
595 } | 595 } |
596 return 0; | 596 return 0; |
597 } | 597 } |
598 | 598 |
599 int32_t VoEBaseImpl::StopSend() { | 599 int32_t VoEBaseImpl::StopSend() { |
600 if (shared_->NumOfSendingChannels() == 0 && | 600 if (shared_->NumOfSendingChannels() == 0) { |
601 !shared_->transmit_mixer()->IsRecordingMic()) { | |
602 // Stop audio-device recording if no channel is recording | 601 // Stop audio-device recording if no channel is recording |
603 if (shared_->audio_device()->StopRecording() != 0) { | 602 if (shared_->audio_device()->StopRecording() != 0) { |
604 shared_->SetLastError(VE_CANNOT_STOP_RECORDING, kTraceError, | 603 shared_->SetLastError(VE_CANNOT_STOP_RECORDING, kTraceError, |
605 "StopSend() failed to stop recording"); | 604 "StopSend() failed to stop recording"); |
606 return -1; | 605 return -1; |
607 } | 606 } |
608 shared_->transmit_mixer()->StopSend(); | 607 shared_->transmit_mixer()->StopSend(); |
609 } | 608 } |
610 | 609 |
611 return 0; | 610 return 0; |
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
678 | 677 |
679 // Deliver audio (PCM) samples to the ADM | 678 // Deliver audio (PCM) samples to the ADM |
680 memcpy(audio_data, audioFrame_.data(), | 679 memcpy(audio_data, audioFrame_.data(), |
681 sizeof(int16_t) * number_of_frames * number_of_channels); | 680 sizeof(int16_t) * number_of_frames * number_of_channels); |
682 | 681 |
683 *elapsed_time_ms = audioFrame_.elapsed_time_ms_; | 682 *elapsed_time_ms = audioFrame_.elapsed_time_ms_; |
684 *ntp_time_ms = audioFrame_.ntp_time_ms_; | 683 *ntp_time_ms = audioFrame_.ntp_time_ms_; |
685 } | 684 } |
686 | 685 |
687 } // namespace webrtc | 686 } // namespace webrtc |
OLD | NEW |