使用音频队列服务时如何减慢或加快音频播放速度?
这可能吗?理论上这是如何实现的?我是否可以简单地制作一个非常小的缓冲数据包大小,然后人为地延迟播放?我想这就是低智商的方式吧?怎样才能做到声音流畅、不刺耳呢?
Is that possible? How is this done in theory? Would I simply make a very small buffer packet size and then delay the playback artificially? I assume that's the low-brain way? How could I do it in such a way that the sound is smooth and doesn't suck?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
AudioQueueSetParameter 与 kAudioQueueParam_PlayRate 应该可以解决问题
https://developer.apple.com/library/mac/documentation/MusicAudio/Reference/AudioQueueReference/Reference/reference.html#//apple_ref/c/func/AudioQueueSetParameter
AudioQueueSetParameter with kAudioQueueParam_PlayRate should do the trick
https://developer.apple.com/library/mac/documentation/MusicAudio/Reference/AudioQueueReference/Reference/reference.html#//apple_ref/c/func/AudioQueueSetParameter
延迟播放会导致音频断断续续。也许这个问题可能会指明方向吗?
Delaying playback will cause stuttering in the audio. Perhaps this question might point the way?