📄 aud_ilm.c
字号:
* FUNCTION
* aud_send_media_resume_cnf
* DESCRIPTION
*
* PARAMETERS
* result [IN]
* RETURNS
* void
*****************************************************************************/
void aud_send_media_resume_cnf(kal_uint8 result)
{
/*----------------------------------------------------------------*/
/* Local Variables */
/*----------------------------------------------------------------*/
l4aud_media_resume_cnf_struct *cnf_p = NULL;
/*----------------------------------------------------------------*/
/* Code Body */
/*----------------------------------------------------------------*/
cnf_p = (l4aud_media_resume_cnf_struct*) construct_local_para(sizeof(l4aud_media_resume_cnf_struct), TD_CTRL);
/* send confirm message to L4 */
cnf_p->src_id = aud_context_p->src_id;
cnf_p->result = result;
aud_send_ilm(aud_context_p->src_mod, MSG_ID_L4AUD_MEDIA_RESUME_CNF, cnf_p, NULL);
}
/*****************************************************************************
* FUNCTION
* aud_send_media_record_finish_ind
* DESCRIPTION
*
* PARAMETERS
* result [IN]
* RETURNS
* void
*****************************************************************************/
void aud_send_media_record_finish_ind(kal_uint8 result)
{
/*----------------------------------------------------------------*/
/* Local Variables */
/*----------------------------------------------------------------*/
l4aud_media_record_finish_ind_struct *ind_p;
/*----------------------------------------------------------------*/
/* Code Body */
/*----------------------------------------------------------------*/
/* send indication message to L4 */
ind_p = (l4aud_media_record_finish_ind_struct*)
construct_local_para(sizeof(l4aud_media_record_finish_ind_struct), TD_CTRL);
ind_p->src_id = aud_context_p->src_id;
ind_p->result = result;
aud_send_ilm(aud_context_p->src_mod, MSG_ID_L4AUD_MEDIA_RECORD_FINISH_IND, ind_p, NULL);
}
/*****************************************************************************
* FUNCTION
* aud_send_media_play_finish_ind
* DESCRIPTION
*
* PARAMETERS
* result [IN]
* RETURNS
* void
*****************************************************************************/
void aud_send_media_play_finish_ind(kal_uint8 result)
{
/*----------------------------------------------------------------*/
/* Local Variables */
/*----------------------------------------------------------------*/
l4aud_media_play_finish_ind_struct *ind_p;
/*----------------------------------------------------------------*/
/* Code Body */
/*----------------------------------------------------------------*/
/* send indication message to L4 */
ind_p = (l4aud_media_play_finish_ind_struct*)
construct_local_para(sizeof(l4aud_media_play_finish_ind_struct), TD_CTRL);
ind_p->src_id = aud_context_p->src_id;
ind_p->result = result;
ind_p->identifier = aud_context_p->identifier;
aud_send_ilm(aud_context_p->src_mod, MSG_ID_L4AUD_MEDIA_PLAY_FINISH_IND, ind_p, NULL);
}
/* for aud_api.c, to send message to media task */
/*****************************************************************************
* FUNCTION
* aud_send_play_id_req
* DESCRIPTION
*
* PARAMETERS
* src_mod_id [IN]
* id_param [?]
* RETURNS
* void
*****************************************************************************/
void aud_send_play_id_req(module_type src_mod_id, void *id_param)
{
/*----------------------------------------------------------------*/
/* Local Variables */
/*----------------------------------------------------------------*/
aud_play_id_struct *data_p = (aud_play_id_struct*) id_param;
l4aud_audio_play_req_struct *msg_p = (l4aud_audio_play_req_struct*)
construct_local_para(sizeof(l4aud_audio_play_req_struct), TD_CTRL);
/*----------------------------------------------------------------*/
/* Code Body */
/*----------------------------------------------------------------*/
msg_p->audio_id = data_p->audio_id;
msg_p->play_style = data_p->play_style;
msg_p->volume = data_p->volume;
msg_p->output_path = data_p->output_path;
msg_p->identifier = data_p->identifier;
aud_send_msg_to_med(src_mod_id, (kal_uint16) MSG_ID_L4AUD_AUDIO_PLAY_REQ, msg_p);
}
/*****************************************************************************
* FUNCTION
* aud_send_stop_id_req
* DESCRIPTION
*
* PARAMETERS
* src_mod_id [IN]
* audio_id [IN]
* RETURNS
* void
*****************************************************************************/
void aud_send_stop_id_req(module_type src_mod_id, kal_uint8 audio_id)
{
/*----------------------------------------------------------------*/
/* Local Variables */
/*----------------------------------------------------------------*/
l4aud_audio_stop_req_struct *msg_p = (l4aud_audio_stop_req_struct*)
construct_local_para(sizeof(l4aud_audio_stop_req_struct), TD_CTRL);
/*----------------------------------------------------------------*/
/* Code Body */
/*----------------------------------------------------------------*/
msg_p->audio_id = audio_id;
aud_send_msg_to_med(src_mod_id, (kal_uint16) MSG_ID_L4AUD_AUDIO_STOP_REQ, msg_p);
}
/*****************************************************************************
* FUNCTION
* aud_send_play_string_req
* DESCRIPTION
*
* PARAMETERS
* src_mod_id [IN]
* string_param [?]
* RETURNS
* void
*****************************************************************************/
void aud_send_play_string_req(module_type src_mod_id, void *string_param)
{
/*----------------------------------------------------------------*/
/* Local Variables */
/*----------------------------------------------------------------*/
aud_play_string_struct *data_p = (aud_play_string_struct*) string_param;
l4aud_audio_play_by_string_req_struct *msg_p = (l4aud_audio_play_by_string_req_struct*)
construct_local_para(sizeof(l4aud_audio_play_by_string_req_struct), TD_CTRL);
/*----------------------------------------------------------------*/
/* Code Body */
/*----------------------------------------------------------------*/
msg_p->src_id = 0;
msg_p->melody = (const kal_uint8*)data_p->data_p;
msg_p->format = data_p->format;
msg_p->len = data_p->len;
msg_p->play_style = data_p->play_style;
msg_p->volume = data_p->volume;
msg_p->output_path = data_p->output_path;
msg_p->identifier = data_p->identifier;
msg_p->blocking = data_p->blocking;
aud_send_msg_to_med(src_mod_id, (kal_uint16) MSG_ID_L4AUD_AUDIO_PLAY_BY_STRING_REQ, msg_p);
}
/*****************************************************************************
* FUNCTION
* aud_send_stop_string_req
* DESCRIPTION
*
* PARAMETERS
* src_mod_id [IN]
* src_id [IN]
* RETURNS
* void
*****************************************************************************/
void aud_send_stop_string_req(module_type src_mod_id, kal_uint8 src_id)
{
/*----------------------------------------------------------------*/
/* Local Variables */
/*----------------------------------------------------------------*/
l4aud_audio_stop_by_string_req_struct *msg_p = (l4aud_audio_stop_by_string_req_struct*)
construct_local_para(sizeof(l4aud_audio_stop_by_string_req_struct), TD_CTRL);
/*----------------------------------------------------------------*/
/* Code Body */
/*----------------------------------------------------------------*/
msg_p->src_id = src_id;
aud_send_msg_to_med(src_mod_id, (kal_uint16) MSG_ID_L4AUD_AUDIO_STOP_BY_STRING_REQ, msg_p);
}
/*****************************************************************************
* FUNCTION
* aud_send_play_file_req
* DESCRIPTION
*
* PARAMETERS
* src_mod_id [IN]
* file_param [?]
* RETURNS
* void
*****************************************************************************/
void aud_send_play_file_req(module_type src_mod_id, void *file_param)
{
/*----------------------------------------------------------------*/
/* Local Variables */
/*----------------------------------------------------------------*/
aud_play_file_struct *data_p = (aud_play_file_struct*) file_param;
l4aud_media_play_req_struct *msg_p = (l4aud_media_play_req_struct*)
construct_local_para(sizeof(l4aud_media_play_req_struct), TD_CTRL);
/*----------------------------------------------------------------*/
/* Code Body */
/*----------------------------------------------------------------*/
msg_p->src_id = 0;
kal_mem_cpy(msg_p->file_name, data_p->file_name_p, MAX_MEDIA_FILE_NAME * 2);
msg_p->play_style = data_p->play_style;
msg_p->volume = data_p->volume;
msg_p->output_path = data_p->output_path;
msg_p->identifier = data_p->identifier;
msg_p->start_offset = data_p->start_offset;
msg_p->end_offset = data_p->end_offset;
msg_p->cache_p = data_p->cache_p;
aud_send_msg_to_med(src_mod_id, (kal_uint16) MSG_ID_L4AUD_MEDIA_PLAY_REQ, msg_p);
}
/*****************************************************************************
* FUNCTION
* aud_send_stop_file_req
* DESCRIPTION
*
* PARAMETERS
* src_mod_id [IN]
* src_id [IN]
* RETURNS
* void
*****************************************************************************/
void aud_send_stop_file_req(module_type src_mod_id, kal_uint8 src_id)
{
/*----------------------------------------------------------------*/
/* Local Variables */
/*----------------------------------------------------------------*/
l4aud_media_stop_req_struct *msg_p = (l4aud_media_stop_req_struct*)
construct_local_para(sizeof(l4aud_media_stop_req_struct), TD_CTRL);
/*----------------------------------------------------------------*/
/* Code Body */
/*----------------------------------------------------------------*/
msg_p->src_id = src_id;
aud_send_msg_to_med(src_mod_id, (kal_uint16) MSG_ID_L4AUD_MEDIA_STOP_REQ, msg_p);
}
/*****************************************************************************
* FUNCTION
* aud_send_record_req
* DESCRIPTION
*
* PARAMETERS
* src_mod_id [IN]
* file_name [?]
* format [IN]
* default_input [IN]
* input_source [IN]
* RETURNS
* void
*****************************************************************************/
void aud_send_record_req(
module_type src_mod_id,
kal_wchar *file_name,
kal_uint8 format,
kal_bool default_input,
kal_uint8 input_source)
{
/*----------------------------------------------------------------*/
/* Local Variables */
/*----------------------------------------------------------------*/
l4aud_media_record_req_struct *msg_p = (l4aud_media_record_req_struct*)
construct_local_para(sizeof(l4aud_media_record_req_struct), TD_CTRL);
/*----------------------------------------------------------------*/
/* Code Body */
/*----------------------------------------------------------------*/
kal_mem_cpy(msg_p->file_name, file_name, MAX_MEDIA_FILE_NAME * ENCODE_BYTE);
msg_p->format = format;
msg_p->default_input = default_input;
msg_p->input_source = input_source;
aud_send_msg_to_med(src_mod_id, (kal_uint16) MSG_ID_L4AUD_MEDIA_RECORD_REQ, msg_p);
}
/*****************************************************************************
* FUNCTION
* aud_send_stop_record_req
* DESCRIPTION
*
* PARAMETERS
* src_mod_id [IN]
* src_id [IN]
* RETURNS
* void
*****************************************************************************/
void aud_send_stop_record_req(module_type src_mod_id, kal_uint8 src_id)
{
/*----------------------------------------------------------------*/
/* Local Variables */
/*----------------------------------------------------------------*/
l4aud_media_stop_req_struct *msg_p = (l4aud_media_stop_req_struct*)
construct_local_para(sizeof(l4aud_media_stop_req_struct), TD_CTRL);
/*----------------------------------------------------------------*/
/* Code Body */
/*----------------------------------------------------------------*/
msg_p->src_id = src_id;
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -