RustAudio / cpal

Cross-platform audio I/O library in pure Rust
Apache License 2.0
2.55k stars 343 forks source link

Suppport ScreenCaptureKit loopback #876

Open thewh1teagle opened 3 months ago

thewh1teagle commented 3 months ago

In recent versions of macOS there's new API called screen capture kit which provides a way to capture the screen content (Audio / Video), That way we can receive audio from the speakers, similar how cpal does that with WSAPI on Windows (Added in #251) As starting point we can follow the approach used in the project scap in engine/mac/mod.rs they capture audio / video using screen capture kit

LatentDream commented 1 month ago

+1

rustdesk commented 1 month ago

+1

Kree0 commented 2 weeks ago

Hello, I'm interested in this issue. But it seems that ScreenCaptureKit works differently. ScreenCaptureKit capture audio through Display/Windows/Application instead of the Device, I don't know how to make it fit the crate.

rustdesk commented 2 weeks ago

Maybe, you can add a virtual device called loopback, which use screencapturekit, the others keep no change