¡@

Home 

2014/10/15 ¤U¤È 10:13:38

iphone Programming Glossary: sampletally

Drawing waveform with AVAssetReader

http://stackoverflow.com/questions/5032775/drawing-waveform-with-avassetreader

NSMutableData alloc init reader startReading UInt64 totalBytes 0 SInt64 totalLeft 0 SInt64 totalRight 0 NSInteger sampleTally 0 NSInteger samplesPerPixel sampleRate 50 while reader.status AVAssetReaderStatusReading AVAssetReaderTrackOutput trackOutput.. sampleCount i SInt16 left samples totalLeft left SInt16 right if channelCount 2 right samples totalRight right sampleTally if sampleTally samplesPerPixel left totalLeft sampleTally SInt16 fix abs left if fix normalizeMax normalizeMax fix.. left samples totalLeft left SInt16 right if channelCount 2 right samples totalRight right sampleTally if sampleTally samplesPerPixel left totalLeft sampleTally SInt16 fix abs left if fix normalizeMax normalizeMax fix fullSongData appendBytes..