Reputation: 4727
1)How can I break up an NSData into chunks?
I want to iterate through the NSData and send each chunk via sendData GameKit.
2)The data that is being sent is an MP3. When the first chunk comes in, I want to convert it back to an MP3, start playing that file, then keep appending the remaining audio to it. How do I?
Upvotes: 1
Views: 1040
Reputation: 6372
You can break it up using the getBytes:length:
and getBytes:range:
instance methods.
Check the reference here.
Use appendData
. Of course this method for a NSMutableData
. Find the reference here
Upvotes: 4