¡@

Home 

2014/10/15 ¤U¤È 10:04:44

iphone Programming Glossary: buffer_size

Iphone - How to encrypt NSData with public key and decrypt with private key?

http://stackoverflow.com/questions/10072124/iphone-how-to-encrypt-nsdata-with-public-key-and-decrypt-with-private-key

generateKeyPair NSUInteger keySize @end ViewController.m file code is as follows #import ViewController.h const size_t BUFFER_SIZE 64 const size_t CIPHER_BUFFER_SIZE 1024 const uint32_t PADDING kSecPaddingNone static const UInt8 publicKeyIdentifier com.apple.sample.publickey.. @end ViewController.m file code is as follows #import ViewController.h const size_t BUFFER_SIZE 64 const size_t CIPHER_BUFFER_SIZE 1024 const uint32_t PADDING kSecPaddingNone static const UInt8 publicKeyIdentifier com.apple.sample.publickey static const.. data with private key int len strlen inputString TODO this is a hack since i know inputString length will be less than BUFFER_SIZE if len BUFFER_SIZE len BUFFER_SIZE 1 plainBuffer uint8_t calloc BUFFER_SIZE sizeof uint8_t cipherBuffer uint8_t calloc CIPHER_BUFFER_SIZE..

RSA implementations in Objective C

http://stackoverflow.com/questions/10222524/rsa-implementations-in-objective-c

generateKeyPair NSUInteger keySize @end ViewController.m file code is as follows #import ViewController.h const size_t BUFFER_SIZE 64 const size_t CIPHER_BUFFER_SIZE 1024 const uint32_t PADDING kSecPaddingNone static const UInt8 publicKeyIdentifier com.apple.sample.publickey.. @end ViewController.m file code is as follows #import ViewController.h const size_t BUFFER_SIZE 64 const size_t CIPHER_BUFFER_SIZE 1024 const uint32_t PADDING kSecPaddingNone static const UInt8 publicKeyIdentifier com.apple.sample.publickey static const.. in Objective C int len strlen inputString TODO this is a hack since i know inputString length will be less than BUFFER_SIZE if len BUFFER_SIZE len BUFFER_SIZE 1 plainBuffer uint8_t calloc BUFFER_SIZE sizeof uint8_t cipherBuffer uint8_t calloc CIPHER_BUFFER_SIZE..

Reading audio buffer data with AudioQueue

http://stackoverflow.com/questions/1248060/reading-audio-buffer-data-with-audioqueue

that the source file is 44100 16 bit mono wav file. My buffer is allocated thusly char buffer NULL buffer malloc BUFFER_SIZE assert buffer All the relevant values are set and used in AudioFileReadPackets inAudioFile false &bytesRead NULL packetNum.. &bytesRead NULL packetNum &numPackets buffer As a test just so that I can see the data retrieved I run for int i 0 i BUFFER_SIZE i NSLog @ i buffer i Now I know my source file peaks all over the place but the values I see only max at 128 and 128. Being.. a pointer to two byte values instead SInt16 buffer NULL Then iterate over half as many samples as bytes for int i 0 i BUFFER_SIZE sizeof buffer i NSLog @ i buffer i I would rename BUFFER_SIZE to BUFFER_SIZE_BYTES to clarify it. share improve this answer..

How do I synthesize sounds with CoreAudio on iPhone/Mac

http://stackoverflow.com/questions/1361148/how-do-i-synthesize-sounds-with-coreaudio-on-iphone-mac

with synthesized audio data in a callback. You would setup the AudeioQueue to run in a new thread as such #define BUFFER_SIZE 16384 #define BUFFER_COUNT 3 static AudioQueueRef audioQueue void SetupAudioQueue OSStatus err noErr Setup the audio device... and pre fill them. for int i 0 i BUFFER_COUNT i AudioQueueBufferRef mBuffer err AudioQueueAllocateBuffer audioQueue BUFFER_SIZE mBuffer if err noErr break AudioQueueCallback NULL audioQueue mBuffer if err noErr err AudioQueueStart audioQueue NULL if..