I want to associate Alexa with an iPhone because I use a sample written in swift 2.2 on Github
So I need to convert it to Swift 3.0
Migrating from Swift 2.2 to Swift 3.0 from xcode, which resolved almost all errors, now the only error that is left is related to AudioQueueBufferRef
Swift 2.2:
self.recorderState = RecorderState(
setupComplete: false,
dataFormat: AudioStreamBasicDescription(),
queue: UnsafeMutablePointer<AudioQueueRef>.alloc(1),
buffers: Array<AudioQueueBufferRef>(count: numberBuffers, repeatedValue: nil),
recordFile: AudioFileID(),
bufferByteSize: 0,
currentPacket: 0,
isRunning: false,
recordPacket: 0,
errorHandler: nil)
Swift 3.0: (option only buffers)
let audioBufferQueue = Array<AudioQueueBufferRef>(repeating: nil, count: numberBuffers)
and in swift 2.2 it works fine, but in swift 3.0 an error is displayed
/ Users / macbookpro / Downloads / iOS-Alexa-master copy / iOS Alexa / AVS / SimplePCMRecorder.swift: 28: 32: The type of the expression "Array" (aka 'Array>') is ambiguous, more context
SimplePCM Recorder of Swift 2.2 on Github
google stackoverflow, . google , .
- , ?