Advertise Mobile SDKs Books Events Forum News Social Networking Support Us
Follow @iphonedevsdk on Twitter

Mockup & CodeGen, iPhone & iPad
($9.99)

Make your own iPhone apps
and run them live!
(free)

Manu
($0.99)

Want your application or service advertised on iPhone Dev SDK?

Go Back   iPhone Dev SDK Forum

View Single Post
Old 07-03-2009, 04:12 AM   #2 (permalink)
pwnified
Registered Member
 
Join Date: Jun 2009
Posts: 25
Default

Quote:
Originally Posted by brambos View Post
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;
pwnified is offline   Reply With Quote
 

» Advertisements
» Stats
Members: 158,695
Threads: 89,168
Posts: 380,424
Top Poster: BrianSlick (7,110)
Welcome to our newest member, Castlem
Powered by vBadvanced CMPS v3.1.0

All times are GMT -5. The time now is 08:08 AM.
Powered by vBulletin® Version 3.8.0
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.