Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>Try the AudioQueue Framework for this. You mainly have to perform 3 steps:</p> <ol> <li>setup an audio format how to sample the incoming analog audio</li> <li>start a new recording AudioQueue with AudioQueueNewInput()</li> <li>Register a callback routine which handles the incoming audio data packages</li> </ol> <p>In step 3 you have a chance to analyze the incoming audio data with AudioQueueGetProperty()</p> <p>It's roughly like this:</p> <pre><code>static void HandleAudioCallback (void *aqData, AudioQueueRef inAQ, AudioQueueBufferRef inBuffer, const AudioTimeStamp *inStartTime, UInt32 inNumPackets, const AudioStreamPacketDescription *inPacketDesc) { // Here you examine your audio data } static void StartRecording() { // now let's start the recording AudioQueueNewInput (&amp;aqData.mDataFormat, // The sampling format how to record HandleAudioCallback, // Your callback routine &amp;aqData, // e.g. AudioStreamBasicDescription NULL, kCFRunLoopCommonModes, 0, &amp;aqData.mQueue); // Your fresh created AudioQueue AudioQueueStart(aqData.mQueue, NULL); } </code></pre> <p>I suggest the <a href="http://developer.apple.com/library/ios/#documentation/MusicAudio/Conceptual/AudioQueueProgrammingGuide/Introduction/Introduction.html#//apple_ref/doc/uid/TP40005343">Apple AudioQueue Services Programming Guide</a> for detailled information about how to start and stop the AudioQueue and how to setup correctly all ther required objects.</p> <p>You may also have a closer look into Apple's demo prog SpeakHere. But this is IMHO a bit confusing to start with.</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload