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

Side by Side Diff: webrtc/modules/audio_device/android/audio_device_unittest.cc

Issue 2219653004: Remove old methods in AudioTransport, make it pass a gn build (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Fix compile. Created 4 years, 4 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
OLDNEW
1 /* 1 /*
2 * Copyright (c) 2015 The WebRTC project authors. All Rights Reserved. 2 * Copyright (c) 2015 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 372 matching lines...) Expand 10 before | Expand all | Expand 10 after
383 int32_t(const void* audioSamples, 383 int32_t(const void* audioSamples,
384 const size_t nSamples, 384 const size_t nSamples,
385 const size_t nBytesPerSample, 385 const size_t nBytesPerSample,
386 const size_t nChannels, 386 const size_t nChannels,
387 const uint32_t samplesPerSec, 387 const uint32_t samplesPerSec,
388 const uint32_t totalDelayMS, 388 const uint32_t totalDelayMS,
389 const int32_t clockDrift, 389 const int32_t clockDrift,
390 const uint32_t currentMicLevel, 390 const uint32_t currentMicLevel,
391 const bool keyPressed, 391 const bool keyPressed,
392 uint32_t& newMicLevel)); 392 uint32_t& newMicLevel));
393
393 MOCK_METHOD8(NeedMorePlayData, 394 MOCK_METHOD8(NeedMorePlayData,
394 int32_t(const size_t nSamples, 395 int32_t(const size_t nSamples,
395 const size_t nBytesPerSample, 396 const size_t nBytesPerSample,
396 const size_t nChannels, 397 const size_t nChannels,
397 const uint32_t samplesPerSec, 398 const uint32_t samplesPerSec,
398 void* audioSamples, 399 void* audioSamples,
399 size_t& nSamplesOut, 400 size_t& nSamplesOut,
400 int64_t* elapsed_time_ms, 401 int64_t* elapsed_time_ms,
401 int64_t* ntp_time_ms)); 402 int64_t* ntp_time_ms));
402 403
404 MOCK_METHOD6(PushCaptureData,
405 void(int voe_channel,
406 const void* audio_data,
407 int bits_per_sample,
408 int sample_rate,
409 size_t number_of_channels,
410 size_t number_of_frames));
411
412 MOCK_METHOD7(PullRenderData,
413 void(int bits_per_sample,
414 int sample_rate,
415 size_t number_of_channels,
416 size_t number_of_frames,
417 void* audio_data,
418 int64_t* elapsed_time_ms,
419 int64_t* ntp_time_ms));
420
403 // Set default actions of the mock object. We are delegating to fake 421 // Set default actions of the mock object. We are delegating to fake
404 // implementations (of AudioStreamInterface) here. 422 // implementations (of AudioStreamInterface) here.
405 void HandleCallbacks(EventWrapper* test_is_done, 423 void HandleCallbacks(EventWrapper* test_is_done,
406 AudioStreamInterface* audio_stream, 424 AudioStreamInterface* audio_stream,
407 int num_callbacks) { 425 int num_callbacks) {
408 test_is_done_ = test_is_done; 426 test_is_done_ = test_is_done;
409 audio_stream_ = audio_stream; 427 audio_stream_ = audio_stream;
410 num_callbacks_ = num_callbacks; 428 num_callbacks_ = num_callbacks;
411 if (play_mode()) { 429 if (play_mode()) {
412 ON_CALL(*this, NeedMorePlayData(_, _, _, _, _, _, _, _)) 430 ON_CALL(*this, NeedMorePlayData(_, _, _, _, _, _, _, _))
(...skipping 596 matching lines...) Expand 10 before | Expand all | Expand 10 after
1009 StopPlayout(); 1027 StopPlayout();
1010 StopRecording(); 1028 StopRecording();
1011 // Verify that the correct number of transmitted impulses are detected. 1029 // Verify that the correct number of transmitted impulses are detected.
1012 EXPECT_EQ(latency_audio_stream->num_latency_values(), 1030 EXPECT_EQ(latency_audio_stream->num_latency_values(),
1013 static_cast<size_t>( 1031 static_cast<size_t>(
1014 kImpulseFrequencyInHz * kMeasureLatencyTimeInSec - 1)); 1032 kImpulseFrequencyInHz * kMeasureLatencyTimeInSec - 1));
1015 latency_audio_stream->PrintResults(); 1033 latency_audio_stream->PrintResults();
1016 } 1034 }
1017 1035
1018 } // namespace webrtc 1036 } // namespace webrtc
OLDNEW
« no previous file with comments | « webrtc/media/engine/webrtcvoiceengine.cc ('k') | webrtc/modules/audio_device/include/audio_device_defines.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698