acm_resampler.h 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. /*
  2. * Copyright (c) 2012 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_CODING_ACM2_ACM_RESAMPLER_H_
  11. #define MODULES_AUDIO_CODING_ACM2_ACM_RESAMPLER_H_
  12. #include <stddef.h>
  13. #include <stdint.h>
  14. #include "common_audio/resampler/include/push_resampler.h"
  15. namespace webrtc {
  16. namespace acm2 {
  17. class ACMResampler {
  18. public:
  19. ACMResampler();
  20. ~ACMResampler();
  21. int Resample10Msec(const int16_t* in_audio,
  22. int in_freq_hz,
  23. int out_freq_hz,
  24. size_t num_audio_channels,
  25. size_t out_capacity_samples,
  26. int16_t* out_audio);
  27. private:
  28. PushResampler<int16_t> resampler_;
  29. };
  30. } // namespace acm2
  31. } // namespace webrtc
  32. #endif // MODULES_AUDIO_CODING_ACM2_ACM_RESAMPLER_H_