¡@

Home 

2014/10/15 ¤U¤È 10:03:52

iphone Programming Glossary: aqrecorder

Data format from recording using Audio Queue framework

http://stackoverflow.com/questions/3963827/data-format-from-recording-using-audio-queue-framework

it must not be right somehow. Here is the code which sets up the audio queue so you can see how it is configured. void AQRecorder SetupAudioFormat UInt32 inFormatID memset mRecordFormat 0 sizeof mRecordFormat UInt32 size sizeof mRecordFormat.mSampleRate.. mode 0 flags mQueue AudioQueueNewInput failed And finally here is the callback which handles new audio data void AQRecorder MyInputBufferHandler void inUserData AudioQueueRef inAQ AudioQueueBufferRef inBuffer const AudioTimeStamp inStartTime.. inBuffer const AudioTimeStamp inStartTime UInt32 inNumPackets const AudioStreamPacketDescription inPacketDesc AQRecorder aqr AQRecorder inUserData try if inNumPackets 0 CAStreamBasicDescription queueFormat aqr DataFormat SoundTouch soundTouch..

Recording mp3 instead of caf file

http://stackoverflow.com/questions/9399019/recording-mp3-instead-of-caf-file

at this example https developer.apple.com library ios #samplecode SpeakHere Introduction Intro.html I modified it the AQRecorder.mm to record mp3 instead of caf file. I changed from kAudioFileCAFType to kAudioFileMP3Type but it does not create the file... caf file. I changed from kAudioFileCAFType to kAudioFileMP3Type but it does not create the file. The code became void AQRecorder SetupAudioFormat UInt32 inFormatID memset mRecordFormat 0 sizeof mRecordFormat UInt32 size sizeof mRecordFormat.mSampleRate.. mRecordFormat.mBitsPerChannel 8 mRecordFormat.mChannelsPerFrame mRecordFormat.mFramesPerPacket 1 void AQRecorder StartRecord CFStringRef inRecordFile int i bufferByteSize UInt32 size CFURLRef url try mFileName CFStringCreateCopy kCFAllocatorDefault..