ios - Setting Track ID -


i having trouble setting track id when set input parameters audiomix. how set trackid? have tried way params.trackid(track2.trackid) gives me error cmpersistanttrackid -> $t4 not identical cmpersistanttrackid. trying translate line [audioinputparams settrackid:[track trackid]]; https://developer.apple.com/library/ios/qa/qa1716/_index.html

error when run code below:

terminating app due uncaught exception 'nsinvalidargumentexception', reason: '-[__nsarraym trackid]: unrecognized selector sent instance 0x7f98c34cbfc0' 

code:

        let type = avmediatypeaudio         let asset1 = avurlasset(url: beatlocationurl, options: nil)         let arr2 = asset1.trackswithmediatype(type)         let track2 = arr2.last avassettrack           let asset = avurlasset(url: vocalurl, options:nil)         let arr3 = asset.trackswithmediatype(type)         let track3 = arr3.last avassettrack            var trackparams = nsmutablearray()          let params = avmutableaudiomixinputparameters(track:track2)         params.setvolume(0.0, attime:kcmtimezero)         params.trackid = track2.trackid <--- line          trackparams.addobject(params)          let params1 = avmutableaudiomixinputparameters(track:track3)         params1.setvolume(1.0, attime: kcmtimezero)         params1.trackid = track3.trackid <-- line         trackparams.addobject(params1)          let mix = avmutableaudiomix()         mix.inputparameters = [trackparams] 


Comments

Popular posts from this blog

matlab - "Contour not rendered for non-finite ZData" -

delphi - Indy UDP Read Contents of Adata -

javascript - Any ideas when Firefox is likely to implement lengthAdjust and textLength? -