My question here is about adding an AKBooster to AKAmplitudeTracker before it gets added to the output later in the signal chain. It should look something like this:
do {
try sprite.MIDISamplerPlayer.loadAudioFile(myAudioFile)
} catch let error as NSError {
print("There's an error: \(error)")
}
sprite.amplitudeTracker = AKAmplitudeTracker(sprite.MIDISamplerPlayer)
sprite.silentBooster = AKBooster(sprite.amplitudeTracker)
sprite.silentBooster?.gain = 0
sprite.silentBooster! >>> mixer
sprite.MIDISamplerPlayer.enableMIDI(sprite.samplerMIDI.client, name: "My MIDISampler")
sprite.MIDISamplerPlayer >>> mixer
sequencer = AKSequencer(filename: myMIDI)
AudioKit.output = mixer
AudioKit.start()
sequencer!.play()
The issue I'm having is that the gain is reporting as 0.0 but volume is playing as normal, ie the gain has no effect on the output.
I can't have AKBooster added to signal chain at the end as I want the AKBooster to be added to tracks in the sequencer.
Ideas on how to solve this much appreciated! Thanks 8•)
EDITED missed some steps in my process, noticed after Aure's answer below...