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

Side by Side Diff: webrtc/modules/audio_processing/test/conversational_speech/mock_wavreader.cc

Issue 2774423005: Conversational Speech tool, WavReaderAdaptor and unit test (Closed)
Patch Set: comments from Karl addressed Created 3 years, 8 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) 2017 The WebRTC project authors. All Rights Reserved. 2 * Copyright (c) 2017 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
11 #include "webrtc/modules/audio_processing/test/conversational_speech/mock_wavrea der.h" 11 #include "webrtc/modules/audio_processing/test/conversational_speech/mock_wavrea der.h"
12 12
13 #include "webrtc/test/gmock.h"
14
15 namespace webrtc { 13 namespace webrtc {
16 namespace test { 14 namespace test {
17 namespace conversational_speech { 15 namespace conversational_speech {
18 16
19 using testing::Return; 17 using testing::Return;
20 18
21 MockWavReader::MockWavReader( 19 MockWavReader::MockWavReader(
22 int sample_rate, size_t num_channels, size_t num_samples) 20 int sample_rate, size_t num_channels, size_t num_samples)
23 : sample_rate_(sample_rate), num_channels_(num_channels), 21 : sample_rate_(sample_rate), num_channels_(num_channels),
24 num_samples_(num_samples) { 22 num_samples_(num_samples) {
25 ON_CALL(*this, sample_rate()).WillByDefault(Return(sample_rate_)); 23 ON_CALL(*this, sample_rate()).WillByDefault(Return(sample_rate_));
26 ON_CALL(*this, num_channels()).WillByDefault(Return(num_channels_)); 24 ON_CALL(*this, num_channels()).WillByDefault(Return(num_channels_));
27 ON_CALL(*this, num_samples()).WillByDefault(Return(num_samples_)); 25 ON_CALL(*this, num_samples()).WillByDefault(Return(num_samples_));
28 } 26 }
29 27
30 MockWavReader::~MockWavReader() = default; 28 MockWavReader::~MockWavReader() = default;
31 29
32 } // namespace conversational_speech 30 } // namespace conversational_speech
33 } // namespace test 31 } // namespace test
34 } // namespace webrtc 32 } // namespace webrtc
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698