Quote:
Originally Posted by brambos
Hi all.. I'm a bit of a noob when it comes to Xcode and Objective-C, so please bear with me.
I have a file with raw audio data (just a bunch of signed 16-bit integers) which I would like to read into an array.
All the examples I see just deal with reading text-files so I'm wondering how to read unformatted binary data with the app.
Any pointers?
Thanks!
|
Something like:
Code:
[myfilehandle seekToFileOffset:myOffset];
NSData *data = [myfilehandle readDataOfLength:myBLockSize];
SInt16 *rawData = data.bytes;
UInt32 length = data.length;