#ifndef AEM_ADAPTER_AUDIO_H #define AEM_ADAPTER_AUDIO_H #include #include #include typedef enum { /** tts event start play */ AEM_AUDIO_START_PLAY = 1, /** tts event stop play */ AEM_AUDIO_STOP_PLAY = 2, /** tts event stop play */ AEM_AUDIO_NEXT_PLAY = 3, } aem_audio_event_e; typedef enum { AEM_AUDIO_CALL, AEM_AUDIO_RINGTONE, AEM_AUDIO_LOCAL_MUSIC, AEM_AUDIO_BT_MUSIC, } aem_volume_type_e; typedef enum { AEM_RINGTONE_CALLRING, AEM_RINGTONE_WELCOME, AEM_RINGTONE_POWEROFF, AEM_RINGTONE_MAX, } aem_ringtone_id_e; typedef struct { uint8_t type; uint8_t name[20 + 1]; } aem_audio_set_t; typedef void (*aem_audio_event_cb)(uint8_t *name, aem_audio_event_e event); /** * @Description : 开始播放音频 * @Param : name(uint8_t *),音频文件名 * @Return : **/ int aem_tts_play(uint8_t *name); /** * @Description : 停止播放音频 * @Param : * @Return : **/ int aem_tts_stop(void); /** * @Description : 注册tts事件回调 * @Param : * @Return : **/ void aem_tts_event_cb_register(aem_audio_event_cb event_cb); /** * @Description : 设置系统音量 * @Param : type(aem_volume_type_e):音量类型 * @Param : volume(int):音量等级 * @Return : **/ int aem_set_system_volume(aem_volume_type_e type, int volume); /** * @Description : 获取系统音量 * @Param : type(aem_volume_type_e):音量类型 * @Return : **/ int aem_get_system_volume(aem_volume_type_e type); /** * @Description : 获取系统最小音量 * @Param : * @Return : **/ int aem_get_system_min_volume(void); /** * @Description : 获取系统最大音量 * @Param : * @Return : **/ int aem_get_system_max_volume(void); /** * @Description : 获取麦克风静音状态 * @Param : * @Return : **/ int aem_get_system_microphone_muted(void); /** * @Description : 设置麦克风静音 * @Param : mute value 1: mute 0: unmute * @Return : **/ void aem_set_system_microphone_muted(int value); int aem_get_audio_system_mute(aem_volume_type_e type); void aem_set_audio_system_mute(aem_volume_type_e type, int mute); void aem_audio_system_set_stream_volume(aem_volume_type_e type, int volume); #endif /* AEM_ADAPTER_AUDIO_H */