Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Loopback support on macOS using new CoreAudio tap API #875

Open
cryptocode opened this issue Jul 26, 2024 · 3 comments
Open

Loopback support on macOS using new CoreAudio tap API #875

cryptocode opened this issue Jul 26, 2024 · 3 comments

Comments

@cryptocode
Copy link

cryptocode commented Jul 26, 2024

I'm using miniaudio for a music visualizer, and it's working great.

However, on macOS, I have to ask users to install software like Blackhole to be able to capture system audio. More often than not, my testers can't make it work + they lose the ability to easily adjust volume.

Apple recently introduces capability to capture audio which I suspect miniaudio could utilize for this purpose. This is not documented well yet, but someone made a repository to make it more approachable: https://github.com/insidegui/AudioCap/

(This example asks you to pick a specific pid, so it may be the case that the new API doesn't allow system-wide audio capture)

@mackron
Copy link
Owner

mackron commented Jul 27, 2024

I noticed the example you linked is in Swift. Is there no way to do it with Obj-C? If it's Swift-only then it'll never be added to miniaudio.

@cryptocode
Copy link
Author

I noticed the example you linked is in Swift. Is there no way to do it with Obj-C? If it's Swift-only then it'll never be added to miniaudio.

I believe it's available for Obj-C as well: https://developer.apple.com/documentation/coreaudio/capturing_system_audio_with_core_audio_taps?language=objc

@barracuda156
Copy link

Just for a note, from the link above it seems that the needed functionality is only supported in Sonoma and above. If that is the case, please add it conditionally on macOS version (if it is added).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
3 participants