Advertise Books Events Forum News Social Networking Support Us

sdkIQ for iPhone
($4.99)

Shape Up
($0.99)

Your First iPhone App
($1.99)

iVidCam Free
(free)

Kid Art
($0.99)

iPUBQUIZ
(£1.19)

ArtStudio
($3.99)

Want your application or service advertised on iPhone Dev SDK?

Go Back   iPhone Dev SDK Forum

View Single Post
Old 07-03-2009, 03: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
 
Enter the iPhone App Challenge!  Win $500!
» Advertisements
» Stats
Members: 24,335
Threads: 39,130
Posts: 171,565
Top Poster: smasher (2,577)
Welcome to our newest member, Mr.David
Powered by vBadvanced CMPS v3.1.0

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