1 /*
2  *  Copyright (c) 2018 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 MODULES_AUDIO_PROCESSING_TEST_AUDIOPROC_FLOAT_IMPL_H_
12 #define MODULES_AUDIO_PROCESSING_TEST_AUDIOPROC_FLOAT_IMPL_H_
13 
14 #include <memory>
15 
16 #include "modules/audio_processing/include/audio_processing.h"
17 
18 namespace webrtc {
19 namespace test {
20 
21 // This function implements the audio processing simulation utility. Pass
22 // |input_aecdump| to provide the content of an AEC dump file as a string; if
23 // |input_aecdump| is not passed, a WAV or AEC input dump file must be specified
24 // via the |argv| argument. Pass |processed_capture_samples| to write in it the
25 // samples processed on the capture side; if |processed_capture_samples| is not
26 // passed, the output file can optionally be specified via the |argv| argument.
27 // Any audio_processing object specified in the input is used for the
28 // simulation. Note that when the audio_processing object is specified all
29 // functionality that relies on using the internal builder is deactivated,
30 // since the AudioProcessing object is already created and the builder is not
31 // used in the simulation.
32 int AudioprocFloatImpl(rtc::scoped_refptr<AudioProcessing> audio_processing,
33                        int argc,
34                        char* argv[]);
35 
36 // This function implements the audio processing simulation utility. Pass
37 // |input_aecdump| to provide the content of an AEC dump file as a string; if
38 // |input_aecdump| is not passed, a WAV or AEC input dump file must be specified
39 // via the |argv| argument. Pass |processed_capture_samples| to write in it the
40 // samples processed on the capture side; if |processed_capture_samples| is not
41 // passed, the output file can optionally be specified via the |argv| argument.
42 int AudioprocFloatImpl(std::unique_ptr<AudioProcessingBuilder> ap_builder,
43                        int argc,
44                        char* argv[],
45                        absl::string_view input_aecdump,
46                        std::vector<float>* processed_capture_samples);
47 
48 }  // namespace test
49 }  // namespace webrtc
50 
51 #endif  // MODULES_AUDIO_PROCESSING_TEST_AUDIOPROC_FLOAT_IMPL_H_
52