deweller/switchaudio-osx

Reliance on deprecated CoreAudio APIs

Closed this issue · 1 comments

There are a lot of CoreAudio deprecated APIs, and some of them are used in switchaudio-osx. Once Apple drops these functions, a future version of MacOS (something newer than Ventura, since it works on Ventura) will drop support for the current version of switchaudio-osx.

Example of deprecated APIs: https://github.com/deweller/switchaudio-osx/blob/master/audio_switch.c#L478

Proof of deprecation: https://developer.apple.com/documentation/coreaudio/1580716-audiohardwaregetpropertyinfo?language=objc

What to do instead: Apparently you can use AudioObjectGetPropertyData and AudioObjectPropertyAddress. See https://www.mail-archive.com/coreaudio-api@lists.apple.com/msg01214.html

Also useful collateral: https://stackoverflow.com/questions/4575408/audioobjectgetpropertydata-to-get-a-list-of-input-devices

Thanks!