audio_ktdetect.h 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  1. /* Copyright (C) 2018 RDA Technologies Limited and/or its affiliates("RDA").
  2. * All rights reserved.
  3. *
  4. * This software is supplied "AS IS" without any warranties.
  5. * RDA assumes no responsibility or liability for the use of the software,
  6. * conveys no license or title under any patent, copyright, or mask work
  7. * right to the product. RDA reserves the right to make changes in the
  8. * software without notification. RDA also make no representation or
  9. * warranty that such application will be suitable for the specified use
  10. * without further testing or modification.
  11. */
  12. #ifndef _AUDIO_KTDETECT_H_
  13. #define _AUDIO_KTDETECT_H_
  14. #include "osi_api.h"
  15. OSI_EXTERN_C_BEGIN
  16. /**
  17. * \brief opaque data structure of keytone detecter
  18. */
  19. typedef struct auKeytoneDetecter auKeytoneDetecter_t;
  20. /**
  21. * \brief function type, keytone detect result report callback
  22. */
  23. typedef void (*keytonedetectHook_t)(char keytone);
  24. /**
  25. * \brief check whether keytone detect is enabled
  26. *
  27. * \return
  28. * - true if keytone detect is enabled
  29. * - false if disabled
  30. */
  31. bool auIsKTDetectEnable(void);
  32. /**
  33. * \brief enable or disable keytone detect function
  34. *
  35. * \param en true for enable keytone detect
  36. * \return
  37. * - true on success
  38. * - false on invalid parameter, or failed
  39. */
  40. void auKTDetectEnable(bool en);
  41. /**
  42. * \brief register hook function for keytone detect report result
  43. *
  44. * \param func the callback function when keytone detect some result
  45. */
  46. void auSetKtdetectCB(keytonedetectHook_t func);
  47. void auKTDetectInit(void);
  48. OSI_EXTERN_C_END
  49. #endif