         try checkError(AudioUnitGetProperty(audioUnit, kAudioUnitProperty_MaximumFramesPerSlice, kAudioUnitScope_Global, 0, &maxFrameSize, &size))
         
         // create buffers
-        bufferLen = Int(maxFrameSize * inputFormat.mBytesPerPacket)
-        buffer = UnsafeMutablePointer<Float>.alloc(bufferLen)
-        buffer2 = UnsafeMutablePointer<Float>.alloc(bufferLen)
+        bufferList = AudioBufferList.allocate(maximumBuffers: Int(outputFormat.mChannelsPerFrame))
+        bufferList.count = Int(outputFormat.mChannelsPerFrame)
+        for var channel = 0; channel < Int(outputFormat.mChannelsPerFrame); ++channel {
+            // build buffer
+            var buffer = AudioBuffer()
+            buffer.mDataByteSize = outputFormat.mBytesPerFrame * maxFrameSize
+            buffer.mNumberChannels = 1 // since non-interleaved
+            buffer.mData = malloc(Int(outputFormat.mBytesPerFrame * maxFrameSize))
+            bufferList[channel] = buffer
+        }
         
         // set frame size
         var frameSize: UInt32 = UInt32(self.frameSize)

        try checkError(AudioUnitGetProperty(audioUnit, kAudioUnitProperty_StreamFormat, kAudioUnitScope_Output, outputBus, &outputFormat, &size))
        
        // print format information for debugging
        DLog("OUT \(outputFormat)")
        
        // check for expected format
        guard outputFormat.mFormatID == kAudioFormatLinearPCM && outputFormat.mFramesPerPacket == 1 && outputFormat.mFormatFlags == kAudioFormatFlagsNativeFloatPacked else {
            throw AudioInterfaceError.UnsupportedFormat
        }
        
        // set the audio format
        //size = UInt32(sizeof(AudioStreamBasicDescription))
        //try checkError(AudioUnitSetProperty(audioUnit, kAudioUnitProperty_StreamFormat, kAudioUnitScope_Input, outputBus, &outputFormat, size))
        
        // initiate output array
        outputHighFor = [Int](count: Int(outputFormat.mChannelsPerFrame), repeatedValue: 0)

    // get audio in interface
    let aii = unsafeBitCast(inRefCon, AudioInputInterface.self)
    
    // number of channels
    let numberOfChannels = Int(aii.inputFormat.mChannelsPerFrame)
    
    // set buffer data size
    for var channel = 0; channel < numberOfChannels; ++channel {
        aii.bufferList[channel].mDataByteSize = aii.inputFormat.mBytesPerFrame * frameCount
    }
    
    // render input
    let status = AudioUnitRender(aii.audioUnit, actionFlags, timeStamp, busNumber, frameCount, aii.bufferList.unsafeMutablePointer)
    
    if noErr != status {
        DLog("error rendering input \(status)")
        return status
    }
    
    // number of floats per channel
    let frameCountAsInteger = Int(frameCount)
    
    // multiple channels? de-interleave
    for var channel = 0; channel < numberOfChannels; ++channel {
        // call delegate
        aii.delegate?.receiveAudioFrom(aii, fromChannel: channel, withData: UnsafeMutablePointer<Float>(aii.bufferList[channel].mData), ofLength: frameCountAsInteger)
    }
    
    return 0
