立即注册
查看: 2274|回复: 3

ASR3601 边下载边播放 流式播放函数 MCI_AudioStreamingPlay 很好用

已绑定手机
发表于 2020-11-17 09:45:47 | 显示全部楼层 |阅读模式 来自 广东省惠州市
36.1.8. MCI_AudioStreamingPlay
Primitive
INT32 MCI_AudioStreamingPlay(INT32 * pBuffer, UINT32 len,
MCI_AUDIO_BUFFER_PLAY_CALLBACK_T callback,
MCI_AUDIO_BUFFER_PLAY_DATA_CALLBACK_T data_callback);
Description
Play audio data continuously with callback. Player starts play audio data stored in ‘pBuffer’, and
‘data_callback’ will be called to fetch new data when run out of it. Supported audio format includes mp3,
AMR-nb,pcm.

Notice: 1>. There must be one valid audio frame in ‘pBuffer’, otherwise player will failed to start.
For PCM format, one wav header should be included in audio data.

For AMR-NB format, amr file header "#!AMR\n" should be in audio data.
For MP3 format, some mp3 file may contain big “ID3” header, please guarantee there is valid
mp3 frame followed by “ID3” header. It’s recommended to skip “ID3” header firstly, and then
start to send valid mp3 frame with this API.
2>. Memory of ‘pBuffer’ used as working buffer of player internally, do not free or overwrite this
buffer during playback.
< pBuffer>: buffer which is used for bufferring audio data.
<len>: valid audio data size in ‘pBuffer’.
<callback>: callback for player status.
MCI_ERR_END_OF_FILE: means playback reaches end of file.
MCI_ERR_ERROR: means error happened during playback.
Notice: Don’t stop player in the callback, it will lead to dead lock.
<data_callback>: callback registed for feeding more audio data.
<return value>: MCI_ERR_NO means success

发表于 2020-11-17 10:45:59 | 显示全部楼层 来自 上海市
哦,学习学习                        
已绑定手机
发表于 2021-1-16 18:16:54 | 显示全部楼层 来自 浙江省杭州市
学习一下有啥资料
已绑定手机
发表于 2021-7-7 08:55:28 | 显示全部楼层 来自 陕西省西安市
有点贵。。。。。。。。。。。。。。。。
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

合作/建议

TEL: 19168984579

工作时间:
周一到周五 9:00-11:30 13:30-19:30
  • 扫一扫关注公众号
  • 扫一扫打开小程序
Copyright © 2013-2024 一牛网 版权所有 All Rights Reserved. 帮助中心|隐私声明|联系我们|手机版|粤ICP备13053961号|营业执照|EDI证
在本版发帖搜索
扫一扫添加微信客服
QQ客服返回顶部
快速回复 返回顶部 返回列表