Resample_api.h 647 B

12345678910111213141516171819202122232425
  1. #ifndef __RESAMPLE_API_H__
  2. #define __RESAMPLE_API_H__
  3. typedef struct _RS_IO_CONTEXT_ {
  4. void *priv;
  5. int(*output)(void *priv, void *data, int len);
  6. } RS_IO_CONTEXT;
  7. typedef struct _RS_PARA_STRUCT_ {
  8. unsigned int new_insample;
  9. unsigned int new_outsample;
  10. int nch;
  11. } RS_PARA_STRUCT;
  12. typedef struct _RS_STUCT_API_ {
  13. unsigned int(*need_buf)();
  14. void (*open)(unsigned int *ptr, RS_PARA_STRUCT *rs_para);
  15. void (*set_sr)(unsigned int *ptr, int newsrI);
  16. int(*run)(unsigned int *ptr, short *inbuf, int len, short *obuf); //len是n个点,返回n个点
  17. } RS_STUCT_API;
  18. RS_STUCT_API *get_rsfast_context();
  19. #endif