     var audioPlayer = AVAudioPlayerNode()
     func decodeAndPlay(data: NSData) {
         let buffer = AVAudioPCMBuffer()
-
-        audioPlayer.scheduleBuffer(buffer, completionHandler: {})
+        println("Received \(data.length)")
+//        audioPlayer.scheduleBuffer(buffer, completionHandler: {})
     }
 }
 

        }
    }

}


    init() {

        var error : NSError?;

        setupAudioSession()

        engine.connect(engine.mainMixerNode, to: engine.outputNode, format: nil)
        engine.startAndReturnError(&error)

        if error != nil {
            println("Error when running engine")
            println(error)
        }
    }

    deinit {
        engine.stop()
        stopAudioSession()
    }

    public func startRecord(block: CompressedDataClosure) {
