Closed jbmaxwell closed 5 years ago
Adding a little info... I did try to upgrade the SynthOne code we're using, but I was getting build errors on sp_oscmorph2d
. I've just tried building from the SynthOne repo and I see the same errors if I remove the version number from the Podfile.
Are you building from the develop
branch? master is currently outdated.
Ah, I am building from master, yes. I'll try with develop.
I'm getting Swift 5 related errors now. Our project is 4.2 (on Xcode 10.3). Is that going to be a showstopper, or is there a version of AudioKit that will work?
UPDATE: Okay, looks like I get back to the same issue with sp_oscmorph2d
when running on 4.8 (specifying the pod as < 4.9
just installs 4.8). Maybe this is a showstopper... Do you have any idea what might be going on with the EXC_BAD_ACCESS
when stopping and restarting AudioKit? I have tested SynthOne itself (master branch, with the AK 4.7 beta version specified in that podfile) and the problem doesn't happen there.
I've double-checked the problem, and even just adding:
DispatchQueue.main.asyncAfter(deadline: .now() + 10.0) {
print("Stop engine (as a test)")
AudioKit.engine.stop()
DispatchQueue.main.asyncAfter(deadline: .now() + 2.0) {
print("Restart engine... does stuff play?")
try! AudioKit.engine.start()
}
}
at the end of my init (in Conductor), and it will crash on playing from SynthOne.
The oscmorph bug got fixed in AudioKit 4.9, so you might wanna use that.
Please provide me with a new stacktrace based on a recent Synth One version, else I can't make any sense of the line numbers inside of it.
Unforuntately I don't have enough time right now to set up an environment that reflects yours. Is there any specific reason you cannot upgrade your project to the most recent swift version?
Yes, like you, time is the main reason we're still on Swift 4.2... But I guess we may have to change that sooner rather than later. I did try with AudioKit 4.7.2.b1 (as in the master branch), using our original Synth One code, but I get the same crash. What I'll do a little later is try with 4.7.2.b1 with your master code (which I've confirmed doesn't have the basic stop/start bug), in our project, and see if that works to keep us going, for now.
Failing a short-term fix for the stop/restart crash, what would be the recommended routine for tearing everything down and starting over—i.e., as if from initial launch? Since it is only the offline rendering/export routine that's causing a problem, it is an option for us to just completely rebuild the audio graph, but I haven't found a reliable process for doing that (which surprises me, since it seems like it should be very simple). Are there any "gotchas" that come to mind, in terms of de/re-instantiating Synth One?
Okay, a Swift 5 upgrade did cure this issue. Thanks.
We're using a "headless" (UI-less) version of SynthOne in our app, just drawing on presets. We built an offline render mode, which renders into a tap and then writes to a file. We had it working on an earlier version, but some recent changes caused an error where now, as soon as we pass the first event after switching to manual render mode, the app crashes in
void S1NoteState::startNoteHelper(int noteNumber, int velocity, float frequency)
with anEXC_BAD_ACCESS
.I've tried completely reconnecting my node graph, but I can't seem to find a way around it. Can anyone shed any light on why it's crashing?
Is there a recommended process for tearing down and rebuilding SynthOne, after stopping and restarting audio? Or is it possible that this is just something to do with manual rendering mode?
One possibility for the change in behaviour is that one of our developers upgraded to Xcode 10.3, which I believe forced an upgrade of AudioKit (i.e., to Swift 4.2). Is it possible that there's an incompatibility between AudioKit and the version of SynthOne we're using (it is not the most recent version).