Post

Replies

Boosts

Views

Activity

Reply to Authorizing Family Controls as individual fails in Simulator.
Using the code               Task {                     do {                         try await center.requestAuthorization(for: .individual)                     } catch {                         print("Failed to enroll Aniyah with error: \(error)")                     }                 } and follow this video the configuration your Xcode project
Jan ’23
Reply to Convert a CMSampleBuffer to AVAudioPCMBuffer
https://developer.apple.com/forums/profile/Zachary+Girouard     func scheduleBuffer(_ sampleBuffer: CMSampleBuffer?) -> AVAudioPCMBuffer? {         var sDescr: CMFormatDescription? = nil         if let sampleBuffer = sampleBuffer {             sDescr = CMSampleBufferGetFormatDescription(sampleBuffer)         }         var numSamples: CMItemCount? = nil         if let sampleBuffer = sampleBuffer {             numSamples = CMSampleBufferGetNumSamples(sampleBuffer)         }         var avFmt: AVAudioFormat? = nil                avFmt = AVAudioFormat(cmAudioFormatDescription: sDescr!)                  var pcmBuffer: AVAudioPCMBuffer? = nil         if let avFmt = avFmt {             pcmBuffer = AVAudioPCMBuffer(pcmFormat: avFmt, frameCapacity: AVAudioFrameCount(UInt(numSamples ?? 0)))         }         pcmBuffer?.frameLength = AVAudioFrameCount(UInt(numSamples ?? 0))         if let sampleBuffer = sampleBuffer, let mutableAudioBufferList = pcmBuffer?.mutableAudioBufferList {             CMSampleBufferCopyPCMDataIntoAudioBufferList(sampleBuffer, at: 0, frameCount: Int32(numSamples ?? 0), into: mutableAudioBufferList)         }         return pcmBuffer     }
Topic: Media Technologies SubTopic: Audio Tags:
Dec ’21
Reply to Authorizing Family Controls as individual fails in Simulator.
Using the code               Task {                     do {                         try await center.requestAuthorization(for: .individual)                     } catch {                         print("Failed to enroll Aniyah with error: \(error)")                     }                 } and follow this video the configuration your Xcode project
Replies
Boosts
Views
Activity
Jan ’23
Reply to Convert a CMSampleBuffer to AVAudioPCMBuffer
https://developer.apple.com/forums/profile/Zachary+Girouard     func scheduleBuffer(_ sampleBuffer: CMSampleBuffer?) -> AVAudioPCMBuffer? {         var sDescr: CMFormatDescription? = nil         if let sampleBuffer = sampleBuffer {             sDescr = CMSampleBufferGetFormatDescription(sampleBuffer)         }         var numSamples: CMItemCount? = nil         if let sampleBuffer = sampleBuffer {             numSamples = CMSampleBufferGetNumSamples(sampleBuffer)         }         var avFmt: AVAudioFormat? = nil                avFmt = AVAudioFormat(cmAudioFormatDescription: sDescr!)                  var pcmBuffer: AVAudioPCMBuffer? = nil         if let avFmt = avFmt {             pcmBuffer = AVAudioPCMBuffer(pcmFormat: avFmt, frameCapacity: AVAudioFrameCount(UInt(numSamples ?? 0)))         }         pcmBuffer?.frameLength = AVAudioFrameCount(UInt(numSamples ?? 0))         if let sampleBuffer = sampleBuffer, let mutableAudioBufferList = pcmBuffer?.mutableAudioBufferList {             CMSampleBufferCopyPCMDataIntoAudioBufferList(sampleBuffer, at: 0, frameCount: Int32(numSamples ?? 0), into: mutableAudioBufferList)         }         return pcmBuffer     }
Topic: Media Technologies SubTopic: Audio Tags:
Replies
Boosts
Views
Activity
Dec ’21