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

Side by Side Diff: webrtc/modules/audio_processing/audio_processing_impl_unittest.cc

Issue 1766233003: Drop the restriction on same forward and reverse sample rate on the AudioFrame interface of the APM (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Created 4 years, 9 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
« no previous file with comments | « webrtc/modules/audio_processing/audio_processing_impl.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (c) 2014 The WebRTC project authors. All Rights Reserved. 2 * Copyright (c) 2014 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 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
58 58
59 // New number of channels. 59 // New number of channels.
60 frame.num_channels_ = 2; 60 frame.num_channels_ = 2;
61 EXPECT_CALL(mock, InitializeLocked()) 61 EXPECT_CALL(mock, InitializeLocked())
62 .Times(2); 62 .Times(2);
63 EXPECT_NOERR(mock.ProcessStream(&frame)); 63 EXPECT_NOERR(mock.ProcessStream(&frame));
64 // ProcessStream sets num_channels_ == num_output_channels. 64 // ProcessStream sets num_channels_ == num_output_channels.
65 frame.num_channels_ = 2; 65 frame.num_channels_ = 2;
66 EXPECT_NOERR(mock.AnalyzeReverseStream(&frame)); 66 EXPECT_NOERR(mock.AnalyzeReverseStream(&frame));
67 67
68 // A new sample rate passed to AnalyzeReverseStream should be an error and 68 // A new sample rate passed to AnalyzeReverseStream should cause an init.
69 // not cause an init.
70 SetFrameSampleRate(&frame, 16000); 69 SetFrameSampleRate(&frame, 16000);
71 EXPECT_CALL(mock, InitializeLocked()) 70 EXPECT_CALL(mock, InitializeLocked()).Times(1);
72 .Times(0); 71 EXPECT_NOERR(mock.AnalyzeReverseStream(&frame));
73 EXPECT_EQ(mock.kBadSampleRateError, mock.AnalyzeReverseStream(&frame));
74 } 72 }
75 73
76 } // namespace webrtc 74 } // namespace webrtc
OLDNEW
« no previous file with comments | « webrtc/modules/audio_processing/audio_processing_impl.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698