简体   繁体   中英

How to access adc and dac directly on android phones?

I am at the beginning stages of a project in which I will be trying to make a hearing aid application for Android. I have wrote a few patches in Pure Data,C sound, and the basic Android sound library which basical take the input from the microphone and play it through headphones. No filtering or amplification.

While Csound gave the best performance, the latency made the tools unusable. I know Android L is suppose to help, but my goal is to create a low cost device hearing assist device. So older phones probably won't get it.

The next idea is to see if I can access the adc and dac values directly, then use C to make my own versions of AudioTrack and Audio record by using the NDK. Basically pointing to the places in memory where these values are coming in.

Is this possible? Also what should I be researching? I can't find anything online about accesses the DAC and ADC directly.

Thank you for your time.

No. "Android" does not provide for direct access by apps to hardware at all.

The NDK does not change that, as you still lack permission to the audio hardware device nodes.

If you have a particular device on which you can install a customized build of Android, then you might be able to do something by adding new APIs or somehow giving your app or a special unix group access to the hardware nodes. But the details of how you might utilize that access would depend on the device chosen.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM