How to change speed #261
Unanswered
developer-poplar
asked this question in
Q&A
Replies: 2 comments 2 replies
|
The general method mentioned in #245 should work except by using |
1 reply
|
This example is in Swift but should be a start. (assuming an ivar withEngine { engine in
let mainMixer = engine.mainMixerNode
guard let mainMixerInputConnectionPoint = engine.inputConnectionPoint(for: mainMixer, inputBus: 0) else {
os_log(.error, "AVAudioEngine missing main mixer node")
return
}
self.varispeed = AVAudioUnitVarispeed()
guard self.varispeed != nil else {
return
}
self.varispeed.auAudioUnit.shouldBypassEffect = false
self.varispeed.rate = 0.75
engine.attach(self.varispeed)
engine.disconnectNodeInput(mainMixer, bus: 0)
engine.connect(self.varispeed, to: mainMixer, format: nil)
guard let mainMixerInputNode = mainMixerInputConnectionPoint.node else {
os_log(.error, "AVAudioEngine missing input node to main mixer node")
return
}
engine.connect(mainMixerInputNode, to: self.varispeed, format: nil)
} |
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Excuse me, how to changed speed.I use SFBAudioPlayer on iOS
All reactions