本文主要是介绍QCC3040---提示音tone模块,希望对大家解决编程问题提供一定的参考价值,需要的开发者们随着小编来一起学习吧!
QCC3040---提示音tone模块
1、提示音相关源文件
1.1 通用源文件
1.2 入耳提示音文件(入耳事件)
2.音频文件放置方法
2.1 路径
1. earbud-qcc3020-firmware/earbud/prompts/sbc
2.earbud-qcc3020-firmware/earbud/prompts/wav
2.2 打包管理文件(ro_fs.x2p)
3、提示音table表
3.1 prompt
/*! Audio prompt configuration */
typedef struct
{const char *filename; /*!< Prompt filename */uint32 rate; /*!< Prompt sample rate */promptFormat format; /*!< Prompt format */unsigned interruptible:1; /*!< Determines whether the audio prompt can be interrupted during playback */unsigned queueable:1; /*!< Determines whether the audio prompt can be queued prior to playback */unsigned local_feedback:1; /*!< The prompt will only be rendered on the local device */} ui_prompt_data_t;typedef union
{ui_tone_data_t tone;ui_prompt_data_t prompt;ui_led_data_t led;} ui_ind_data_t;typedef struct
{/*! System Event that should cause a UI Event to be indicated */MessageId sys_event;/*! Data about the UI Indication associated with the System Event */ui_ind_data_t data;/*!< Determines whether the UI Indicator should receive notificationonce the indication has completed. */bool await_indication_completion;} ui_event_indicator_table_t;/*! \brief The prompt file format */
typedef enum prompt_format
{PROMPT_FORMAT_PCM,PROMPT_FORMAT_SBC,
} promptFormat;
3.2 tone
tone产生由DSP生产,在源文件earbud/src/earbud_tones.c(ringtone_note类型很特别)
4、musical notations
这篇关于QCC3040---提示音tone模块的文章就介绍到这儿,希望我们推荐的文章对编程师们有所帮助!