杰里之 实现录音后退出录音模式进入音乐模式播放录音文件】【篇】
方式二:
此种方式录音完毕后从录音模式退出到音乐文件播放录音下来的文件。
在 music_player.c 文件加入如下函数。
杰里之 实现录音后退出录音模式进入音乐模式播放录音文件】【篇】
puts(“obj == YES\n”);
file_operate_set_file_sel_mode(obj->fop, PLAY_FILE_BYPATH);
file_operate_set_path(obj->fop, path, index);
file_operate_set_dev_sel_mode(obj->fop, DEV_SEL_SPEC);
file_operate_set_dev(obj->fop, dev);
puts(“2\n”);
ret = music_player_play(obj, NULL, 1);
if (ret == false) {
puts(">>>music_play faild\n");
return ret;
}
///stop dec
music_decoder_stop(obj->dop);
file_operate_set_file_sel_mode(obj->fop, PLAY_SPEC_FILE);
if(PLAY_LAST_FILE== mode)
{
file_operate_set_file_number(obj->fop, path_totolfile);
}else{
file_operate_set_file_number(obj->fop, path_firstfile+index-1);
}
ret = music_player_play(obj, NULL, 1);
return ret;
}

相关文章:

  • 2021-12-13
  • 2021-12-23
  • 2021-12-12
  • 2021-07-03
  • 2021-09-05
  • 2021-09-28
  • 2021-04-22
猜你喜欢
  • 2021-10-29
  • 2021-09-15
  • 2022-01-08
  • 2021-04-09
  • 2021-11-28
  • 2021-09-11
相关资源
相似解决方案