Post

Replies

Boosts

Views

Activity

Reply to How do I turn an array of Float into an AVAudioPCMBuffer?
Thanks to 'sbooth' on StackOverflow for the answer, I was missing .baseAddress on the mData: argument: var floats: [Float] = ... // this comes from somewhere else try floats.withUnsafeMutableBufferPointer { bytes in let audioBuffer = AudioBuffer(mNumberChannels: 1, mDataByteSize: UInt32(bytes.count * MemoryLayout<Float>.size), mData: bytes.baseAddress) var bufferList = AudioBufferList(mNumberBuffers: 1, mBuffers: audioBuffer) let outputAudioBuffer = AVAudioPCMBuffer(pcmFormat: buffer.format, bufferListNoCopy: &bufferList)! try self.renderedAudioFile?.write(from: outputAudioBuffer) }
Jun ’22
Reply to swift-frontend memory usage
Spotlight indexing hasn't stopped on my M1 machine for almost a month and a half, it's using something like 70% of two or three cores, continuously. Originally I thought it was the 11.6 update that did it but now I'm pretty sure it's this bug. I reported it in FB9639588 and linked back here. Still no movement on the bug.
Nov ’21