Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我在 iOS 上使用 AudioKit 4.01。使用 AKAudioPlayer.replace(file:) 后,AKAudioPlayer 不再正确循环:它不再考虑值“endTime”,文件一直播放到结束。这是一个错误还是我错过了什么?
endTime您说替换文件后AudioKit不再考虑。在或被调用时AKAudioPlayer重置它。endTimereloadFile()replace(file:)
endTime
AKAudioPlayer
reloadFile()
replace(file:)
从 4.0.1 开始调用层次结构:
replace(file:)-> reloadFile()->initialize()
initialize()
initialize()sets endingFrame = totalFrameCount,这是endTime从中计算出来的。
endingFrame = totalFrameCount
解决方法是在endTime之后重新设置replace(file:)