Guides and Sample Code Developer
Search

MediaToolbox Changes for Swift

MediaToolbox

Modified MTAudioProcessingTapCallbacks [struct]
Declaration
From
struct MTAudioProcessingTapCallbacks {
    var version: Int32
    var clientInfo: UnsafeMutablePointer<Void>
    var `init`: MTAudioProcessingTapInitCallback?
    var finalize: MTAudioProcessingTapFinalizeCallback?
    var prepare: MTAudioProcessingTapPrepareCallback?
    var unprepare: MTAudioProcessingTapUnprepareCallback?
    var process: MTAudioProcessingTapProcessCallback
}
To
struct MTAudioProcessingTapCallbacks {
    var version: Int32
    var clientInfo: UnsafeMutableRawPointer?
    var `init`: MediaToolbox.MTAudioProcessingTapInitCallback?
    var finalize: MediaToolbox.MTAudioProcessingTapFinalizeCallback?
    var prepare: MediaToolbox.MTAudioProcessingTapPrepareCallback?
    var unprepare: MediaToolbox.MTAudioProcessingTapUnprepareCallback?
    var process: MediaToolbox.MTAudioProcessingTapProcessCallback
}

Modified MTAudioProcessingTapCallbacks.clientInfo
Declaration
From
var clientInfo: UnsafeMutablePointer<Void>
To
var clientInfo: UnsafeMutableRawPointer?

Modified MTAudioProcessingTapCallbacks.finalize
Declaration
From
var finalize: MTAudioProcessingTapFinalizeCallback?
To
var finalize: MediaToolbox.MTAudioProcessingTapFinalizeCallback?

Modified MTAudioProcessingTapCallbacks.init
Declaration
From
var `init`: MTAudioProcessingTapInitCallback?
To
var `init`: MediaToolbox.MTAudioProcessingTapInitCallback?

Modified MTAudioProcessingTapCallbacks.prepare
Declaration
From
var prepare: MTAudioProcessingTapPrepareCallback?
To
var prepare: MediaToolbox.MTAudioProcessingTapPrepareCallback?

Modified MTAudioProcessingTapCallbacks.process
Declaration
From
var process: MTAudioProcessingTapProcessCallback
To
var process: MediaToolbox.MTAudioProcessingTapProcessCallback

Modified MTAudioProcessingTapCallbacks.unprepare
Declaration
From
var unprepare: MTAudioProcessingTapUnprepareCallback?
To
var unprepare: MediaToolbox.MTAudioProcessingTapUnprepareCallback?

Modified MTAudioProcessingTapFinalizeCallback
Declaration
From
typealias MTAudioProcessingTapFinalizeCallback = (MTAudioProcessingTap) -> Void
To
typealias MTAudioProcessingTapFinalizeCallback = (MTAudioProcessingTap) -> Swift.Void

Modified MTAudioProcessingTapGetSourceAudio(_: MTAudioProcessingTap, _: CMItemCount, _: UnsafeMutablePointer<AudioBufferList>, _: UnsafeMutablePointer<MTAudioProcessingTapFlags>?, _: UnsafeMutablePointer<CMTimeRange>?, _: UnsafeMutablePointer<CMItemCount>?) -> OSStatus
Declaration
From
func MTAudioProcessingTapGetSourceAudio(_ tap: MTAudioProcessingTap, _ numberFrames: CMItemCount, _ bufferListInOut: UnsafeMutablePointer<AudioBufferList>, _ flagsOut: UnsafeMutablePointer<MTAudioProcessingTapFlags>, _ timeRangeOut: UnsafeMutablePointer<CMTimeRange>, _ numberFramesOut: UnsafeMutablePointer<CMItemCount>) -> OSStatus
To
func MTAudioProcessingTapGetSourceAudio(_ tap: MTAudioProcessingTap, _ numberFrames: CMItemCount, _ bufferListInOut: UnsafeMutablePointer<AudioBufferList>, _ flagsOut: UnsafeMutablePointer<MTAudioProcessingTapFlags>?, _ timeRangeOut: UnsafeMutablePointer<CMTimeRange>?, _ numberFramesOut: UnsafeMutablePointer<CMItemCount>?) -> OSStatus

Modified MTAudioProcessingTapGetStorage(_: MTAudioProcessingTap) -> UnsafeMutableRawPointer
Declaration
From
func MTAudioProcessingTapGetStorage(_ tap: MTAudioProcessingTap) -> UnsafeMutablePointer<Void>
To
func MTAudioProcessingTapGetStorage(_ tap: MTAudioProcessingTap) -> UnsafeMutableRawPointer

Modified MTAudioProcessingTapInitCallback
Declaration
From
typealias MTAudioProcessingTapInitCallback = (MTAudioProcessingTap, UnsafeMutablePointer<Void>, UnsafeMutablePointer<UnsafeMutablePointer<Void>>) -> Void
To
typealias MTAudioProcessingTapInitCallback = (MTAudioProcessingTap, UnsafeMutableRawPointer?, UnsafeMutablePointer<UnsafeMutableRawPointer?>) -> Swift.Void

Modified MTAudioProcessingTapPrepareCallback
Declaration
From
typealias MTAudioProcessingTapPrepareCallback = (MTAudioProcessingTap, CMItemCount, UnsafePointer<AudioStreamBasicDescription>) -> Void
To
typealias MTAudioProcessingTapPrepareCallback = (MTAudioProcessingTap, CMItemCount, UnsafePointer<AudioStreamBasicDescription>) -> Swift.Void

Modified MTAudioProcessingTapProcessCallback
Declaration
From
typealias MTAudioProcessingTapProcessCallback = (MTAudioProcessingTap, CMItemCount, MTAudioProcessingTapFlags, UnsafeMutablePointer<AudioBufferList>, UnsafeMutablePointer<CMItemCount>, UnsafeMutablePointer<MTAudioProcessingTapFlags>) -> Void
To
typealias MTAudioProcessingTapProcessCallback = (MTAudioProcessingTap, CMItemCount, MTAudioProcessingTapFlags, UnsafeMutablePointer<AudioBufferList>, UnsafeMutablePointer<CMItemCount>, UnsafeMutablePointer<MTAudioProcessingTapFlags>) -> Swift.Void

Modified MTAudioProcessingTapUnprepareCallback
Declaration
From
typealias MTAudioProcessingTapUnprepareCallback = (MTAudioProcessingTap) -> Void
To
typealias MTAudioProcessingTapUnprepareCallback = (MTAudioProcessingTap) -> Swift.Void

Feedback