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

Side by Side Diff: webrtc/modules/audio_device/ios/audio_device_unittest_ios.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 362 matching lines...) Expand 10 before | Expand all | Expand 10 after
373 int32_t(const void* audioSamples, 373 int32_t(const void* audioSamples,
374 const size_t nSamples, 374 const size_t nSamples,
375 const size_t nBytesPerSample, 375 const size_t nBytesPerSample,
376 const size_t nChannels, 376 const size_t nChannels,
377 const uint32_t samplesPerSec, 377 const uint32_t samplesPerSec,
378 const uint32_t totalDelayMS, 378 const uint32_t totalDelayMS,
379 const int32_t clockDrift, 379 const int32_t clockDrift,
380 const uint32_t currentMicLevel, 380 const uint32_t currentMicLevel,
381 const bool keyPressed, 381 const bool keyPressed,
382 uint32_t& newMicLevel)); 382 uint32_t& newMicLevel));
383
383 MOCK_METHOD8(NeedMorePlayData, 384 MOCK_METHOD8(NeedMorePlayData,
384 int32_t(const size_t nSamples, 385 int32_t(const size_t nSamples,
385 const size_t nBytesPerSample, 386 const size_t nBytesPerSample,
386 const size_t nChannels, 387 const size_t nChannels,
387 const uint32_t samplesPerSec, 388 const uint32_t samplesPerSec,
388 void* audioSamples, 389 void* audioSamples,
389 size_t& nSamplesOut, 390 size_t& nSamplesOut,
390 int64_t* elapsed_time_ms, 391 int64_t* elapsed_time_ms,
391 int64_t* ntp_time_ms)); 392 int64_t* ntp_time_ms));
392 393
394 MOCK_METHOD6(PushCaptureData,
395 void(int voe_channel,
396 const void* audio_data,
397 int bits_per_sample,
398 int sample_rate,
399 size_t number_of_channels,
400 size_t number_of_frames));
401
402 MOCK_METHOD7(PullRenderData,
403 void(int bits_per_sample,
404 int sample_rate,
405 size_t number_of_channels,
406 size_t number_of_frames,
407 void* audio_data,
408 int64_t* elapsed_time_ms,
409 int64_t* ntp_time_ms));
410
393 // Set default actions of the mock object. We are delegating to fake 411 // Set default actions of the mock object. We are delegating to fake
394 // implementations (of AudioStreamInterface) here. 412 // implementations (of AudioStreamInterface) here.
395 void HandleCallbacks(EventWrapper* test_is_done, 413 void HandleCallbacks(EventWrapper* test_is_done,
396 AudioStreamInterface* audio_stream, 414 AudioStreamInterface* audio_stream,
397 size_t num_callbacks) { 415 size_t num_callbacks) {
398 test_is_done_ = test_is_done; 416 test_is_done_ = test_is_done;
399 audio_stream_ = audio_stream; 417 audio_stream_ = audio_stream;
400 num_callbacks_ = num_callbacks; 418 num_callbacks_ = num_callbacks;
401 if (play_mode()) { 419 if (play_mode()) {
402 ON_CALL(*this, NeedMorePlayData(_, _, _, _, _, _, _, _)) 420 ON_CALL(*this, NeedMorePlayData(_, _, _, _, _, _, _, _))
(...skipping 435 matching lines...) Expand 10 before | Expand all | Expand 10 after
838 StopPlayout(); 856 StopPlayout();
839 StopRecording(); 857 StopRecording();
840 // Verify that the correct number of transmitted impulses are detected. 858 // Verify that the correct number of transmitted impulses are detected.
841 EXPECT_EQ(latency_audio_stream->num_latency_values(), 859 EXPECT_EQ(latency_audio_stream->num_latency_values(),
842 static_cast<size_t>( 860 static_cast<size_t>(
843 kImpulseFrequencyInHz * kMeasureLatencyTimeInSec - 1)); 861 kImpulseFrequencyInHz * kMeasureLatencyTimeInSec - 1));
844 latency_audio_stream->PrintResults(); 862 latency_audio_stream->PrintResults();
845 } 863 }
846 864
847 } // namespace webrtc 865 } // namespace webrtc
OLDNEW
« no previous file with comments | « webrtc/modules/audio_device/include/audio_device_defines.h ('k') | webrtc/modules/audio_device/test/audio_device_test_api.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698