¡@

Home 

2014/10/15 ¤U¤È 10:04:37

iphone Programming Glossary: blockbufferref

Extract iPod Library raw PCM samples and play with sound effects

http://stackoverflow.com/questions/4796643/extract-ipod-library-raw-pcm-samples-and-play-with-sound-effects

objectAtIndex 0 CMSampleBufferRef sampleBufferRef trackOutput copyNextSampleBuffer if sampleBufferRef CMBlockBufferRef blockBufferRef CMSampleBufferGetDataBuffer sampleBufferRef size_t length CMBlockBufferGetDataLength blockBufferRef UInt8 buffer length.. CMBlockBufferRef blockBufferRef CMSampleBufferGetDataBuffer sampleBufferRef size_t length CMBlockBufferGetDataLength blockBufferRef UInt8 buffer length CMBlockBufferCopyDataBytes blockBufferRef 0 length buffer NSData data NSData alloc initWithBytes buffer.. sampleBufferRef size_t length CMBlockBufferGetDataLength blockBufferRef UInt8 buffer length CMBlockBufferCopyDataBytes blockBufferRef 0 length buffer NSData data NSData alloc initWithBytes buffer length length fullSongData appendData data data release..

Drawing waveform with AVAssetReader

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

objectAtIndex 0 CMSampleBufferRef sampleBufferRef trackOutput copyNextSampleBuffer if sampleBufferRef CMBlockBufferRef blockBufferRef CMSampleBufferGetDataBuffer sampleBufferRef size_t length CMBlockBufferGetDataLength blockBufferRef totalBytes length NSAutoreleasePool.. CMBlockBufferRef blockBufferRef CMSampleBufferGetDataBuffer sampleBufferRef size_t length CMBlockBufferGetDataLength blockBufferRef totalBytes length NSAutoreleasePool wader NSAutoreleasePool alloc init NSMutableData data NSMutableData dataWithLength length.. wader NSAutoreleasePool alloc init NSMutableData data NSMutableData dataWithLength length CMBlockBufferCopyDataBytes blockBufferRef 0 length data.mutableBytes SInt16 samples SInt16 data.mutableBytes int sampleCount length bytesPerSample for int i 0 i sampleCount..