iphone Programming Glossary: bytestoread
AVAssetReader and Audio Queue streaming problem http://stackoverflow.com/questions/4763598/avassetreader-and-audio-queue-streaming-problem inBuffer AQPlayerState pplayerState AQPlayerState playerStateH if pplayerState mIsRunning 0 return UInt32 bytesToRead pplayerState bufferByteSize NSNotificationCenter defaultCenter postNotificationName NOTIF_callsample object nil float inData.. nil float inData float inBuffer mAudioData int offsetSample 0 Loop until finish reading from the music data while bytesToRead THIS IS THE PROBLEMATIC LINE CMSampleBufferRef sampBuffer pplayerState assetWrapper getNextSampleBuffer the assetreader.. audioBuffer audioBufferList.mBuffers 0 memcpy inData 2 offsetSample audioBuffer.mData audioBuffer.mDataByteSize bytesToRead bytesToRead audioBuffer.mDataByteSize offsetSample offsetSample audioBuffer.mDataByteSize 8 inBuffer mAudioDataByteSize..
How to reverse an audio file? http://stackoverflow.com/questions/6593118/how-to-reverse-an-audio-file theData malloc dataSize Read data into buffer UInt32 readPoint dataSize UInt32 writePoint 0 while readPoint 0 UInt32 bytesToRead 2 AudioFileReadBytes inputAudioFile false readPoint bytesToRead theData AudioFileWriteBytes outputAudioFile false writePoint.. dataSize UInt32 writePoint 0 while readPoint 0 UInt32 bytesToRead 2 AudioFileReadBytes inputAudioFile false readPoint bytesToRead theData AudioFileWriteBytes outputAudioFile false writePoint bytesToRead theData writePoint 2 readPoint 2 free theData AudioFileClose.. inputAudioFile false readPoint bytesToRead theData AudioFileWriteBytes outputAudioFile false writePoint bytesToRead theData writePoint 2 readPoint 2 free theData AudioFileClose inputAudioFile AudioFileClose outputAudioFile share improve..
|