views:

25

answers:

1

Hi

I'm trying to record an audio stream which is streamed using matt gallagher's audio classes.

So far, I've searched the web as I do not really understand the audio queue services. I'm quite new to iphone programming, and audio queue services is really a complex part of the iphone programming.

I'm stuck on this part of the code :

if(AudioQueueNewInput(
&dataFormat,
AudioInputCallback,
self,
CFRunLoopGetCurrent(),
kCFRunLoopCommonModes,
0,
&queue) == noErr) { 
} 

Where should I put this please? Because when I add this in the init, it crashes the program.

 AudioQueueStart(queue, NULL);

After having tried the steps given on this page, I didn't succeed. It doesn't bug, nor produce any file. I expected it to produce and .aiff file.

Help please...

A: 

If you are asking if you need to create an audio queue (and checking to make sure that AudioQueueNewInput worked, e.g. returned a queue) before starting it, the yes.

Try looking at Apple's SpeakHere example app (on developer.apple.com) as a template for using audio queues.

hotpaw2