Reputation: 1102
Trying to resuscitate an older project after the recent AKSampler updates. As per docs it would seem that the original AKSampler functionality would now reside in the new AKAppleSampler. Yet when I am trying any of the methods for loading soundfonts, I get an unfortunate "AudioKit.AKAppleSampler loadMelodicSoundFont:preset:error:]: unrecognized selector sent" before the try clause even catches.
let midiSampler = AKAppleSampler()
do {
try midiSampler.loadMelodicSoundFont("GeneralMidi", preset: i)
} catch { print("!! initSamplerBank failed with error: \(error)") }
Tried new projects with AudioKit 4.2, 4.2.3 and the current develop branch and am not really sure what I might be overlooking here. Any help appreciated.
Upvotes: 1
Views: 140
Reputation: 1102
Solved. Seems the project even though syntax highlighting all methods correctly was somehow still referencing an older AudioKit version's framework. After cleaning, emptying DerivedData and installing AK via Cocoapods as opposed to direct framework link the AppleMIDISampler now loads soundfonts as expected.
Upvotes: 3