Is CFunctionPointer
supported in Xcode6
?I am trying to run following code
class Queue {
var desc : AudioStreamBasicDescription
var queue : AudioQueue?
init(){}
func audioQueueHandleBuffer(ctx : UnsafeMutablePointer<()>,
inAQ : AudioQueue!,
inBuffer : AudioQueueBufferRef) -> Void{
}
func initialize() {
// this does not work!
var err = AudioQueueNewOutput(&desc, audioQueueHandleBuffer, //getting error
nil, nil, nil, 0, queue)
}
}
But i am getting error.In previous version release note it is explicitly mention that CFunctionPointer
is not available.But in Xcode6.1
release notes it is not mention.
How to pass callback in pure swift project.Is there any other way to get buffer in swift?