Problems with microphones
Problems with microphones
- Subject: Problems with microphones
- From: Allison Newman <email@hidden>
- Date: Sat, 15 Jun 2013 10:06:57 +0200
Hi everyone,
I’m having a few problems getting data from a microphone on a Mac. Here’s where I’m at so far:
The setup:
HALOutputUnit (default system microphone) ==> RingBuffer
RingBuffer ==> AudioConverter Unit ==> Speakers
I can see the data getting read from the microphone and getting written to the ring buffer
I can see the data getting pulled from the ring buffer by the AudioConverterUnit
I hear nothing from the speakers.
If I replace the AudioConverterUnit with an AudioFilePlayer unit, I can play an .m4a from my iTunes library and it comes out the speakers.
So I decided to have a look at what was arriving at the output end of the audio graph by placing a « Sink » unit that I have written. The sink unit is just a GenericOutput unit that I periodically call AudioUnitRender on to pull data through the audio graph.
If I have my file player hooked up as the input, I see the data from the file being pulled in by the sink unit. If I hook up my microphone unit as the input, AudioUnitRender returns an error code of 2.
So I have a bunch of questions (in priority order):
1) Does anybody know what an error code of 2 means when received from AudioUnitRender? (and to think I was so pleased at first that at least it wasn’t the inscrutable -50 error)
2) Can anybody tell me where in the docs I should go to find out what this error code means?
3) My sink unit needs to be informed of the ASBD that it will be pulling through so as to set up it’s AudioBufferList. I do not need to do that for the default speakers. How do the default speakers know about the format of the data that they are pulling???
4) Have I missed anything? Do you need more information? Don’t hesitate to ask, because I’ve been bashing my head against this problem for over a week now, and I’m pretty much willing to do anything if anyone can help me out :)
Allison Newman
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Coreaudio-api mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden