Help with similar app
Hello,
I am deaf and wear cochlear implants. I am able to stream my iPhone directly to my hearing aids without any adapter, however, for some reason this is not possible in macOS. I have to use a bluetooth dongle which needs charging and sometimes cuts out.
I am trying to make a macOS server and iOS client app that sends the system audio from macOS to iOS either over bluetooth or the network whichever is lower latency.
The idea is that I will connect my hearing aids to my iPhone and when I play a YouTube or Netflix video on my Mac, the Audio is sent from my Mac to my iPhone and then to my hearing aids.
However, from what I've seen this is very complicated to do and requires knowledge on CoreAudio as well as other low level APIs. Unfortunately this is not something I can do myself, but your project seems to be similar. I was wondering if you could help me at all?
Thanks, Ben
Hi, @iambenmitchell!
My project is basically converting mic-in to audio out (either AirPods or anything includes, I think, your hearing device) on iPhone or iPad, which is using AVFoundation API that is a little bit higher level API. Therefore there is something you need to figure out is actually how to transfer audio from Mac to iPhone I think.
With this code, the simplest way is connecting your Mac and iPhone with the audio cable that converts line-out to mic-in, then you can redirect Mac or any line-out supported device to iPhone and iPhone to hearing device. Likely delay is zero to very minimum depends on the destination audio device. If it is a Bluetooth device, like AirPods as my use case, the delay is probably acceptable level for example normal gaming.
However, to eliminate such physical cable between Mac and iPhone, likely you need to implement AirPlay or similar thing. AirPlay can redirect any Mac audio output or video player output to the destination via network with taking care of the streaming delay. This can be way significant, without such implementation watching video is a bit difficult I think. The interesting fact is that the opposite direction has been implemented already on macOS Monterey ("AirPlay Receiver", in Sharing pane in Preferences,) but not on iOS side, and likely Apple will not implement it. Probably you have already found though, also there is 3rd party app, Airfoil that does this, so you may want to try it.