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

Side by Side Diff: webrtc/modules/audio_processing/test/simulator_buffers.h

Issue 2517523003: Added a perf test for the residual echo detector. (Closed)
Patch Set: Replaced <algorithm> by <numeric>. Created 4 years 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
(Empty)
1 /*
2 * Copyright (c) 2016 The WebRTC project authors. All Rights Reserved.
3 *
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
6 * tree. An additional intellectual property rights grant can be found
7 * in the file PATENTS. All contributing project authors may
8 * be found in the AUTHORS file in the root of the source tree.
9 */
10
11 #ifndef WEBRTC_MODULES_AUDIO_PROCESSING_TEST_SIMULATOR_BUFFERS_H_
12 #define WEBRTC_MODULES_AUDIO_PROCESSING_TEST_SIMULATOR_BUFFERS_H_
13
14 #include <memory>
15 #include <vector>
16
17 #include "webrtc/base/random.h"
18 #include "webrtc/modules/audio_processing/audio_buffer.h"
19 #include "webrtc/modules/audio_processing/include/audio_processing.h"
20
21 namespace webrtc {
22 namespace test {
23
24 struct SimulatorBuffers {
25 SimulatorBuffers(int render_input_sample_rate_hz,
26 int capture_input_sample_rate_hz,
27 int render_output_sample_rate_hz,
28 int capture_output_sample_rate_hz,
29 size_t num_render_input_channels,
30 size_t num_capture_input_channels,
31 size_t num_render_output_channels,
32 size_t num_capture_output_channels);
33 ~SimulatorBuffers();
34
35 void CreateConfigAndBuffer(int sample_rate_hz,
36 size_t num_channels,
37 Random* rand_gen,
38 std::unique_ptr<AudioBuffer>* buffer,
39 StreamConfig* config,
40 std::vector<float*>* buffer_data,
41 std::vector<float>* buffer_data_samples);
42
43 void UpdateInputBuffers();
44
45 std::unique_ptr<AudioBuffer> render_input_buffer;
46 std::unique_ptr<AudioBuffer> capture_input_buffer;
47 std::unique_ptr<AudioBuffer> render_output_buffer;
48 std::unique_ptr<AudioBuffer> capture_output_buffer;
49 StreamConfig render_input_config;
50 StreamConfig capture_input_config;
51 StreamConfig render_output_config;
52 StreamConfig capture_output_config;
53 std::vector<float*> render_input;
54 std::vector<float> render_input_samples;
55 std::vector<float*> capture_input;
56 std::vector<float> capture_input_samples;
57 std::vector<float*> render_output;
58 std::vector<float> render_output_samples;
59 std::vector<float*> capture_output;
60 std::vector<float> capture_output_samples;
61 };
62
63 } // namespace test
64 } // namespace webrtc
65
66 #endif // WEBRTC_MODULES_AUDIO_PROCESSING_TEST_SIMULATOR_BUFFERS_H_
OLDNEW
« no previous file with comments | « webrtc/modules/audio_processing/test/performance_timer.cc ('k') | webrtc/modules/audio_processing/test/simulator_buffers.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698