¡@

Home 

2014/10/15 ¤U¤È 10:11:46

iphone Programming Glossary: myoutputs

How to copy songs from iPod Library to app and play with AVAudioPlayer?

http://stackoverflow.com/questions/7472141/how-to-copy-songs-from-ipod-library-to-app-and-play-with-avaudioplayer

nil autorelease AVAssetReader reader AVAssetReader alloc initWithAsset asset error nil autorelease NSMutableArray myOutputs NSMutableArray alloc init autorelease for id track in asset tracks AVAssetReaderTrackOutput output AVAssetReaderTrackOutput.. AVAssetReaderTrackOutput output AVAssetReaderTrackOutput assetReaderTrackOutputWithTrack track outputSettings nil myOutputs addObject output reader addOutput output reader startReading NSFileHandle fileHandle NSFileManager fm NSFileManager defaultManager.. fileHandle NSFileHandle fileHandleForUpdatingAtPath fileURL fileHandle seekToEndOfFile AVAssetReaderOutput output myOutputs objectAtIndex 0 int totalBuff 0 while TRUE CMSampleBufferRef ref output copyNextSampleBuffer if ref NULL break copy data..

iOS 5.0 crash when reading data from an AVAssetReaderOutput

http://stackoverflow.com/questions/7812394/ios-5-0-crash-when-reading-data-from-an-avassetreaderoutput

in 5.0 it crashes towards the end with bad access not sure why anyone have any input AVAssetReaderOutput output myOutputs objectAtIndex 0 int totalBuff 0 while TRUE CMSampleBufferRef ref output copyNextSampleBuffer if ref NULL break copy data.. asset error nil autorelease reader setTimeRange CMTimeRangeMake kCMTimeZero kCMTimePositiveInfinity NSMutableArray myOutputs NSMutableArray alloc init for id track in asset tracks AVAssetReaderTrackOutput ot AVAssetReaderTrackOutput assetReaderTrackOutputWithTrack.. tracks AVAssetReaderTrackOutput ot AVAssetReaderTrackOutput assetReaderTrackOutputWithTrack track outputSettings nil myOutputs addObject ot reader addOutput ot reader startReading NSFileHandle fileHandle NSFileManager fm NSFileManager defaultManager..