【问题标题】:Connecting different AudioKit Effects in array在数组中连接不同的 AudioKit 效果
【发布时间】:2018-03-21 17:49:12
【问题描述】:

我有一个 AudioKit 效果数组,可以灵活地添加/删除或更改它们的顺序,将它们存储为 AKNode

var effects : [AKNode] = []

effects.append(AKCompressor())
effects.append(AKDelay())
effects.append(AKAutoWah())
... ...

问题在于连接:

effects[0].connect(to: effects[1])

它不起作用:无法使用类型为“(到:AKNode)”的参数列表调用“连接”

也许我应该存储 AKNode 以外的其他类。最好的方法是什么?

【问题讨论】:

    标签: ios swift swift4 audiokit


    【解决方案1】:

    使用 AKInput 数组。 connection functions 使用 AKInputAKOutput 协议。 AKInput 继承自 AKOutput,因此它们也是输出。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2014-08-27
      • 1970-01-01
      • 1970-01-01
      • 2019-10-02
      • 2021-08-11
      • 2011-11-15
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多