api_stream.h 637 B

12345678910111213141516
  1. #ifndef _API_STREAM_H
  2. #define _API_STREAM_H
  3. ///通用AUDIO数据流Buffer管理
  4. typedef struct {
  5. u32 size; //stream buf size
  6. volatile u32 len; //stream buf valid data bytes
  7. u8 *buf; //stream buf start address
  8. u8 *wptr; //stream buf write point
  9. u8 *rptr; //stream buf read point
  10. } au_stm_t;
  11. bool puts_stm_buf(au_stm_t *stm, u8 *buf, u32 len);
  12. bool gets_stm_buf(au_stm_t *stm, u8 *buf, u32 len);
  13. void pcm_soft_vol_process(s16 *ptr, int gain, int samples); //通用软件调音量函数
  14. #endif // _API_STREAM_H