bt_audio_timestamp.h 2.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  1. /*****************************************************************
  2. >file name : bt_audio_timestamp.h
  3. >create time : Fri 21 May 2021 03:05:35 PM CST
  4. *****************************************************************/
  5. #ifndef _BT_AUDIO_TIMESTAMP_H_
  6. #define _BT_AUDIO_TIMESTAMP_H_
  7. #include "typedef.h"
  8. #define TWS_A2DP_AUDIO 0
  9. #define TWS_ESCO_AUDIO 1
  10. #define TWS_FILE_AUDIO 2
  11. #define TWS_SHARE_AUDIO 3
  12. #define TWS_UNKOWN_AUDIO 8
  13. /*===================================A2DP 音频时间戳接口==================================*/
  14. void *a2dp_audio_timestamp_create(int sample_rate, u32 timestamp, u8 factor);
  15. u32 a2dp_audio_update_timestamp(void *handle, u16 seqn, u32 dts);
  16. void a2dp_audio_delay_offset_update(void *handle, int distance);
  17. int a2dp_audio_sample_rate(void *handle);
  18. bool a2dp_audio_timestamp_is_available(void *handle, u16 seqn, u32 dts, int *drop);
  19. int tws_a2dp_share_timestamp(void *handle);
  20. void a2dp_audio_set_base_time(void *handle, u32 base_time);
  21. void a2dp_audio_timestamp_close(void *handle);
  22. int a2dp_tws_audio_conn_offline(void);
  23. void a2dp_tws_audio_conn_delete(void);
  24. /*========================================================================================*/
  25. /*===================================ESCO 音频时间戳接口==================================*/
  26. void *esco_audio_timestamp_create(u8 frame_clkn, u32 delay_time, u8 factor);
  27. u32 esco_audio_timestamp_update(void *handle, u32 time);
  28. void esco_audio_timestamp_close(void *handle);
  29. /*========================================================================================*/
  30. /*===================================FILE 音频时间戳接口==================================*/
  31. void *file_audio_timestamp_create(u32 magic, int sample_rate, u32 timestamp, u32 delay_time, u8 factor);
  32. bool tws_file_timestamp_available(void *handle);
  33. u32 file_audio_timestamp_update(void *handle, u32 dts);
  34. void file_audio_timestamp_close(void *handle);
  35. /*========================================================================================*/
  36. #endif