我该如何在iPhone上实现流式音频的查找(时间线功能)?
AudioFileStreamSeek方法接受我想从哪个字节偏移开始寻找。我想能够获取正在播放的mp3的当前位置,并让用户在以后的某个时间回到相同的位置(seek)。
但我找不到任何方法知道已播放的字节数。我可以找到已流传的字节数。但无法找出已播放的字节数。我正在使用Matt Gallagher的音频流示例作为基础。
非常感激您的帮助。
谢谢。
Might just be able to find a solution. AudioFileStreamSeek documentation says
After you call this function, the parser assumes the next data passed to the AudioFileStreamParseBytes function starts from the byte offset returned in the outAbsoluteByteOffset parameter.
How do we do that? Should we be using the Http Range parameter? If we send the byte offset to Range, will it work as expected? And how should I clear the existing bytes in the buffer to avoid two streams to play together?
Any help greatly appreciated. 谢谢。