¡@

Home 

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

iphone Programming Glossary: audiodata

How do I record audio on iPhone with AVAudioRecorder?

http://stackoverflow.com/questions/1010343/how-do-i-record-audio-on-iphone-with-avaudiorecorder

10 void stopRecording recorder stop NSURL url NSURL fileURLWithPath recorderFilePath NSError err nil NSData audioData NSData dataWithContentsOfFile url path options 0 error err if audioData NSLog @ audio data @ d @ err domain err code err.. recorderFilePath NSError err nil NSData audioData NSData dataWithContentsOfFile url path options 0 error err if audioData NSLog @ audio data @ d @ err domain err code err userInfo description editedObject setValue NSData dataWithContentsOfURL..

How to upload a mp3 file upto 5 mb size on webserver in iPhone

http://stackoverflow.com/questions/11862273/how-to-upload-a-mp3-file-upto-5-mb-size-on-webserver-in-iphone

this question 1 .To convert audio file to NSData NSString audioFilePath @ local path where audio stored NSData audioData NSData alloc initWithContentsOfFile audioFilePath 2 .To upload audio file NSString audioName @ myAudio.caf ASIFormDataRequest.. ASIFormDataRequest request ASIFormDataRequest requestWithURL NSURL URLWithString @ http someurl.aspx request addData audioData withFileName audioName andContentType @ audio caf forKey @ audioFile request setDelegate self request setTimeOutSeconds..

iPhone: AVAudioPlayer unsupported file type

http://stackoverflow.com/questions/4901709/iphone-avaudioplayer-unsupported-file-type

file to the Documents folder and then initialized the player with the file URL download file and play from disk NSData audioData NSData dataWithContentsOfURL someURL NSString docDirPath NSSearchPathForDirectoriesInDomains NSDocumentDirectory NSUserDomainMask.. NSUserDomainMask YES objectAtIndex 0 NSString filePath NSString stringWithFormat @ @ @.mp3 docDirPath fileName audioData writeToFile filePath atomically YES NSError error NSURL fileURL NSURL fileURLWithPath filePath player AVAudioPlayer alloc..

AVAudioPlayer memory leak

http://stackoverflow.com/questions/5771799/avaudioplayer-memory-leak

the below that still has a memory leak. What else can be done to avoid the leak AVAudioPlayer NSAutoreleasePool audioDataspool NSAutoreleasePool alloc init pool is created NSString soundpath NSBundle mainBundle pathForResource @ cardwhoosh ofType.. alloc init pool is created NSString soundpath NSBundle mainBundle pathForResource @ cardwhoosh ofType @ mp3 NSData audioData NSData dataWithContentsOfFile soundpath autorelease AVAudioPlayer player AVAudioPlayer alloc initWithData audioData error.. audioData NSData dataWithContentsOfFile soundpath autorelease AVAudioPlayer player AVAudioPlayer alloc initWithData audioData error NULL soundpath nil soundpath release player play play sound player nil player release player autorelease audioData..

iPhone FFT with Accelerate framework vDSP

http://stackoverflow.com/questions/6358764/iphone-fft-with-accelerate-framework-vdsp

packet Count d packetCount UInt32 packetsRead packetCount UInt32 numBytesRead 1 if packetCount 0 allocate buffer audioData SInt16 malloc 2 packetCount read the packets result AudioFileReadPackets mAudioFile false numBytesRead NULL 0 packetsRead.. malloc 2 packetCount read the packets result AudioFileReadPackets mAudioFile false numBytesRead NULL 0 packetsRead audioData NSLog NSString stringWithFormat @ Read d bytes d packets numBytesRead packetsRead return result FFT code below log2n N n..