I am trying to set the bands in my equalizer by using AudioUnitSetProperty but cant figure out the syntax in Swift. My code looks like this:
var eqFrequencies: NSArray = [ 32, 250, 500, 1000, 2000, 16000 ]
var noBands = UInt32(eqFrequencies.count)
AudioUnitSetProperty(self.MyAppUnit, AudioUnitParameterID(kAUNBandEQProperty_NumberOfBands), AudioUnitScope(kAudioUnitScope_Global), 0, 6, UInt32(sizeof(noBands)))
Anyone know the correct way of doing this?