audio_resampler.h 600 B

1234567891011121314151617181920212223242526272829303132333435
  1. /*
  2. * audio_resample.h
  3. *
  4. * Created on: 2022年2月22日
  5. * Author: pengzc
  6. */
  7. #ifndef JNI_VOIP_AUDIO_RESAMPLE_H_
  8. #define JNI_VOIP_AUDIO_RESAMPLE_H_
  9. #include "audio_parameter.h"
  10. #include <stdint.h>
  11. namespace base {
  12. class AudioResampler {
  13. public:
  14. AudioResampler(const AudioParameter& in, const AudioParameter& out);
  15. virtual ~AudioResampler();
  16. /**
  17. * 0 转换成功
  18. * 非0 失败
  19. */
  20. int Convert(const uint8_t *in , int in_count,
  21. uint8_t **out, int* out_count);
  22. private:
  23. class Impl;
  24. Impl* impl_;
  25. };
  26. } /* namespace voip */
  27. #endif /* JNI_VOIP_AUDIO_RESAMPLE_H_ */