Access raw microphone input data at lowest level

I need to extract information (real-time) from high-frequency microphone data.


  • I want to make sure there is no internal sample-rate conversion happening. Processing can only decrease information content.
  • I want to be aware of any noise cancelling (I'm not sure if it is beneficial or not, as I imagine it would comprise synthesising input from multiple microphones, hence could in theory increase information content).
  • I want to choose the most suitable microphone (it is possible the 3 microphones on a modern phone will have different hardware characteristics)


How can I guarantee to be using the hardware sampling rate? Is the hardware sampling rate even fixed? I imagine so, as one would not want multiple apps competing to reset it.


I am most grateful for any information that can help me build forwards.


π

Replies

Hi, I support in part your enquiry. The HAL AU input "kAudioUnitSubType_HALOutput" has only one visible parameter "ID14", which refers to volume. What the other thirteen are for does not seem to be public 😟. We need to turn on/off ambient noise reduction programatically, as it creates undesired sound artifacts (which may be ok for some applications, but not for ours). In the 27" iMac, System Prefs do not even allow that possibility. In macbook it is available from SysPrefs.

Regarding your "internal" sampling rate, in most Apple devices you can sample at 88200, 96000 Hz, which is more than you need for audio.