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 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
55 FakeAudioCaptureModule::kNumberBytesPerSample)) { | 55 FakeAudioCaptureModule::kNumberBytesPerSample)) { |
56 ADD_FAILURE(); | 56 ADD_FAILURE(); |
57 return -1; | 57 return -1; |
58 } | 58 } |
59 memcpy(rec_buffer_, audioSamples, rec_buffer_bytes_); | 59 memcpy(rec_buffer_, audioSamples, rec_buffer_bytes_); |
60 ++push_iterations_; | 60 ++push_iterations_; |
61 newMicLevel = currentMicLevel; | 61 newMicLevel = currentMicLevel; |
62 return 0; | 62 return 0; |
63 } | 63 } |
64 | 64 |
| 65 void PushCaptureData(int voe_channel, |
| 66 const void* audio_data, |
| 67 int bits_per_sample, |
| 68 int sample_rate, |
| 69 size_t number_of_channels, |
| 70 size_t number_of_frames) override {} |
| 71 |
| 72 void PullRenderData(int bits_per_sample, |
| 73 int sample_rate, |
| 74 size_t number_of_channels, |
| 75 size_t number_of_frames, |
| 76 void* audio_data, |
| 77 int64_t* elapsed_time_ms, |
| 78 int64_t* ntp_time_ms) override {} |
| 79 |
65 // ADM is pulling data. | 80 // ADM is pulling data. |
66 int32_t NeedMorePlayData(const size_t nSamples, | 81 int32_t NeedMorePlayData(const size_t nSamples, |
67 const size_t nBytesPerSample, | 82 const size_t nBytesPerSample, |
68 const size_t nChannels, | 83 const size_t nChannels, |
69 const uint32_t samplesPerSec, | 84 const uint32_t samplesPerSec, |
70 void* audioSamples, | 85 void* audioSamples, |
71 size_t& nSamplesOut, | 86 size_t& nSamplesOut, |
72 int64_t* elapsed_time_ms, | 87 int64_t* elapsed_time_ms, |
73 int64_t* ntp_time_ms) override { | 88 int64_t* ntp_time_ms) override { |
74 rtc::CritScope cs(&crit_); | 89 rtc::CritScope cs(&crit_); |
(...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
190 | 205 |
191 EXPECT_EQ(0, fake_audio_capture_module_->InitRecording()); | 206 EXPECT_EQ(0, fake_audio_capture_module_->InitRecording()); |
192 EXPECT_EQ(0, fake_audio_capture_module_->StartRecording()); | 207 EXPECT_EQ(0, fake_audio_capture_module_->StartRecording()); |
193 | 208 |
194 EXPECT_TRUE_WAIT(push_iterations() > 0, kMsInSecond); | 209 EXPECT_TRUE_WAIT(push_iterations() > 0, kMsInSecond); |
195 EXPECT_TRUE_WAIT(pull_iterations() > 0, kMsInSecond); | 210 EXPECT_TRUE_WAIT(pull_iterations() > 0, kMsInSecond); |
196 | 211 |
197 EXPECT_EQ(0, fake_audio_capture_module_->StopPlayout()); | 212 EXPECT_EQ(0, fake_audio_capture_module_->StopPlayout()); |
198 EXPECT_EQ(0, fake_audio_capture_module_->StopRecording()); | 213 EXPECT_EQ(0, fake_audio_capture_module_->StopRecording()); |
199 } | 214 } |
OLD | NEW |