| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright 2012 The WebRTC project authors. All Rights Reserved. | 2 * Copyright 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 606 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 617 return false; | 617 return false; |
| 618 } | 618 } |
| 619 | 619 |
| 620 bool FakeAudioCaptureModule::ShouldStartProcessing() { | 620 bool FakeAudioCaptureModule::ShouldStartProcessing() { |
| 621 return recording_ || playing_; | 621 return recording_ || playing_; |
| 622 } | 622 } |
| 623 | 623 |
| 624 void FakeAudioCaptureModule::UpdateProcessing(bool start) { | 624 void FakeAudioCaptureModule::UpdateProcessing(bool start) { |
| 625 if (start) { | 625 if (start) { |
| 626 if (!process_thread_) { | 626 if (!process_thread_) { |
| 627 process_thread_ = rtc::Thread::Create(); | 627 process_thread_.reset(new rtc::Thread()); |
| 628 process_thread_->Start(); | 628 process_thread_->Start(); |
| 629 } | 629 } |
| 630 process_thread_->Post(RTC_FROM_HERE, this, MSG_START_PROCESS); | 630 process_thread_->Post(RTC_FROM_HERE, this, MSG_START_PROCESS); |
| 631 } else { | 631 } else { |
| 632 if (process_thread_) { | 632 if (process_thread_) { |
| 633 process_thread_->Stop(); | 633 process_thread_->Stop(); |
| 634 process_thread_.reset(nullptr); | 634 process_thread_.reset(nullptr); |
| 635 } | 635 } |
| 636 started_ = false; | 636 started_ = false; |
| 637 } | 637 } |
| (...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 715 kNumberBytesPerSample, | 715 kNumberBytesPerSample, |
| 716 kNumberOfChannels, | 716 kNumberOfChannels, |
| 717 kSamplesPerSecond, kTotalDelayMs, | 717 kSamplesPerSecond, kTotalDelayMs, |
| 718 kClockDriftMs, current_mic_level, | 718 kClockDriftMs, current_mic_level, |
| 719 key_pressed, | 719 key_pressed, |
| 720 current_mic_level) != 0) { | 720 current_mic_level) != 0) { |
| 721 RTC_NOTREACHED(); | 721 RTC_NOTREACHED(); |
| 722 } | 722 } |
| 723 SetMicrophoneVolume(current_mic_level); | 723 SetMicrophoneVolume(current_mic_level); |
| 724 } | 724 } |
| OLD | NEW |