【发布时间】:2016-12-04 12:33:16
【问题描述】:
要播放,我正在使用 AVAudioUnitSampler:
sampler.stopNote(note, onChannel: channel)
但我不想停止使用:
DispatchQueue.main.asyncAfter(
deadline: DispatchTime.now() + Double(Int64(0.7 * Double(NSEC_PER_SEC))) / Double(NSEC_PER_SEC))
{
sampler.stopNote(note, onChannel: channel)
}
什么是更好的解决方案? 谢谢
【问题讨论】:
-
你在使用 AVMIDIPlayer 吗?如果是这样,您应该在问题的标题中说明这一点
-
我正在使用 AVAudioUnitSampler,但我对其他方法持开放态度