audioproc_float_impl.h 2.4 KB

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