search for: nsdata

Displaying 10 results from an estimated 10 matches for "nsdata".

Did you mean: sdata
2012 Feb 25
0
Speex-with-header-byte and Google ASR
...ate_, (spx_int16_t*)buf, &bits_); int frame_length = speex_bits_write(&bits_, encoded_frame_data_ + 1, kMaxSpeexFrameLength); encoded_frame_data_[0] = static_cast<char>(frame_length); speex_bits_reset(&bits_); NSUserDefaults *defs = [NSUserDefaults standardUserDefaults]; NSData *dataToSend = [NSData dataWithBytes:encoded_frame_data_ length:frame_length]; NSArray *array = [NSArray arrayWithObjects:dataToSend, [defs objectForKey:@"inLang"], nil]; NSLog(@"WriteToFile -> dataToSend: [%d]", [dataToSend length]); [mAudioStreamer performSelectorOnMai...
2012 Feb 25
0
Speex-with-header-byte and Google ASR
...ate_, (spx_int16_t*)buf, &bits_); int frame_length = speex_bits_write(&bits_, encoded_frame_data_ + 1, kMaxSpeexFrameLength); encoded_frame_data_[0] = static_cast<char>(frame_length); speex_bits_reset(&bits_); NSUserDefaults *defs = [NSUserDefaults standardUserDefaults]; NSData *dataToSend = [NSData dataWithBytes:encoded_frame_data_ length:frame_length]; NSArray *array = [NSArray arrayWithObjects:dataToSend, [defs objectForKey:@"inLang"], nil]; NSLog(@"WriteToFile -> dataToSend: [%d]", [dataToSend length]); [mAudioStreamer performSelectorOnMai...
2011 Jun 02
1
Any tips for speeding up encoding on iPhone?
...if (nbBytes) { // 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...
2013 May 27
1
Empty buffer on encoder write byte
...)); memcpy(pcmInput, audioBuffer.mData, count * sizeof(opus_int16)); [_encoder encodeWithPCMInput:pcmInput frameSize:frameSize outputBlock:^(unsigned char *payloadOutput, opus_int32 payloadLength) { // Send the audio data through UDP socket. NSData *audioData = [NSData dataWithBytes:payloadOutput length:payloadLength]; [_socket sendData:audioData toHost:RTC_SERVER_HOST port:RTC_MEDIA_SERVER_PORT withTimeout:PACKET_TIMEOUT tag:AUDIO_DATA_TAG]; free(pcmInput); pcmInput = NULL; }];...
2013 Feb 12
0
Speexdec says: 'This doesn't look like a Speex file' (am I missing headers?)
...bleData = [NSMutableData dataWithLength:blockBufferDataLength]; CMBlockBufferCopyDataBytes(blockBufferRef, 0, blockBufferDataLength, allSamplesMutableData.mutableBytes); // copying bytes to object int nextSampleStartPosition = 0; for (int i = 0; i < numberOfSamples; i++) { NSData *singleSampleData = [NSData dataWithBytes:[[allSamplesMutableData subdataWithRange:NSMakeRange( nextSampleStartPosition, sampleSize)] bytes] length:sampleSize]; nextSampleStartPosition += sampleSize; [_intermediateSampleBuffer addObject:singleSampleData]; // we put samples here unt...
2013 Feb 12
0
Speexdec says: 'This doesn't look like a Speex file' (am I missing headers?).
...bleData = [NSMutableData dataWithLength:blockBufferDataLength]; CMBlockBufferCopyDataBytes(blockBufferRef, 0, blockBufferDataLength, allSamplesMutableData.mutableBytes); // copying bytes to object int nextSampleStartPosition = 0; for (int i = 0; i < numberOfSamples; i++) { NSData *singleSampleData = [NSData dataWithBytes:[[allSamplesMutableData subdataWithRange:NSMakeRange(nextSampleStartPosition, sampleSize)] bytes] length:sampleSize]; nextSampleStartPosition += sampleSize; [_intermediateSampleBuffer addObject:singleSampleData]; // we put samples h...
2013 Feb 12
0
Speexdec says: 'This doesn't look like a Speex file' (am I missing headers?).
...bleData = [NSMutableData dataWithLength:blockBufferDataLength]; CMBlockBufferCopyDataBytes(blockBufferRef, 0, blockBufferDataLength, allSamplesMutableData.mutableBytes); // copying bytes to object int nextSampleStartPosition = 0; for (int i = 0; i < numberOfSamples; i++) { NSData *singleSampleData = [NSData dataWithBytes:[[allSamplesMutableData subdataWithRange:NSMakeRange( nextSampleStartPosition, sampleSize)] bytes] length:sampleSize]; nextSampleStartPosition += sampleSize; [_intermediateSampleBuffer addObject:singleSampleData]; // we put samples here unt...
2013 Feb 12
0
Speexdec says: 'This doesn't look like a Speex file' (am I missing headers?)
...bleData = [NSMutableData dataWithLength:blockBufferDataLength]; CMBlockBufferCopyDataBytes(blockBufferRef, 0, blockBufferDataLength, allSamplesMutableData.mutableBytes); // copying bytes to object int nextSampleStartPosition = 0; for (int i = 0; i < numberOfSamples; i++) { NSData *singleSampleData = [NSData dataWithBytes:[[allSamplesMutableData subdataWithRange:NSMakeRange(nextSampleStartPosition, sampleSize)] bytes] length:sampleSize]; nextSampleStartPosition += sampleSize; [_intermediateSampleBuffer addObject:singleSampleData]; // we put samples h...
2010 May 03
1
Help decompressing Speex audio
I have an audio file compressed by JSpeex that I'm trying to decompress on the iPhone. I've been trying to work from the speexdec example in an attempt to port the core logic to ObjC. I have a class that does the decode and passes the result back to another class. (currently the other class is a unit test.) My other class is writing the converted output to disk. I compare the results of my
2009 Oct 13
2
Mac R spinning wheel with Package Manager (PR#14005)
...1 -[__NSPlaceholderDictionary initWithContentsOfFile:] + 63 (in CoreFoundation) [0x942b44bf] 1 +[NSDictionary(NSDictionary) newWithContentsOf:immutable:] + 144 (in Foundation) [0x91e21320] 1 -[NSData(NSData) initWithContentsOfFile:] + 83 (in Foundation) [0x91e21413] 1 _close$UNIX2003 + 10 (in libSystem.B.dylib) [0x945d0852] 1 __handleWindowNeedsDisplay + 436 (in AppKit) [0x965bd84c] 1 -[NSWindo...