Displaying 1 result from an estimated 1 matches for "datawithbytesnocopy".
2011 Jun 02
1
Any tips for speeding up encoding on iPhone?
...bBytes) {
// write to file
// first write the header (2 bytes)
// the header must contain the number of compressed bytes
for a frame
static bool once = NO;
if (!once) {
[file writeData: [NSData dataWithBytesNoCopy: &nbBytes
length: sizeof(nbBytes)]];
once = YES;
}
// write encoded data
[file writeData: [NSData dataWithBytesNoCopy:
_compressedSpeexBuffer length: nbBytes]];
// remove from buffer -- one frame...