-
Notifications
You must be signed in to change notification settings - Fork 377
Add System audio loopback on Mac using Screen Capture Kit API #892
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
base: master
Are you sure you want to change the base?
Conversation
|
I have successfully built and replaced libportaudio.2.dylib into my directory |
@fightingforyou46
Could you please try the above steps just to rule out any issues with your test or build setup. |
|
I saw it like this: and I used it , I got this error: |
So, I see the device is being listed correctly. |
|
I use it with python sounddevice. I just replace libportaudio.dylib in sounddevice/portaudio_binary/ then use it with my code |
|
Thanks for your contribution. This seems to be at the proof-of-concept stage. Are you planning on fleshing this out and maintaining it? For now I'm marking this as draft. We're not going to merge this until it is more complete. The following issues are apparent:
The first two definitely need to be addressed. The last would need to be justified. |
|
A callback API should be possible. Screen Capture Kit API doc says:
|
|
@jkarthic could you please rebase this on the latest master, since we've fixed the issue that was causing Mac CI to fail. Also, awaiting your response to our other comments. Thank you. |
d55b1b0 to
151b8f8
Compare
151b8f8 to
28acd77
Compare
|
@RossBencina |
|
Also all the CI tests seems to passing for the dummy PR I created in my repo. get-wrecked#1 |
|
Thanks for clarifying and for your contribution. Right now we don't think it is ready to merge. We don't want to discard your good work, so we will keep this PR around as a draft. Right now we're not going to merge this because:
If anyone would like to step up and complete and maintain this we would be happy for this new host API to reach our master branch when it's ready. |
- Changed the sample rate supported to only 48000. Other sampling rates seem to have some issue. - Reduced the sleep time for lower latency - Reduced the buffer size for lower latency
|
@jkarthic I have tested the newest commit of you. here is the resuilt: |
b7d03e9 to
7349eb7
Compare
… waits in main thread

Mac's CoreAudio API doesn't support capture of system audio. But the newly introduced ScreenCaptureKit API support capturing of system audio. This will require the user to provide screen sharing permissions though.
This is the initial version that supports only mono capture and blocking APIs.
But it can be easily extended to support other features as well.