I'm creating app that listening other app's sound. in this use case, screen data is not needed.
but if I don't call SCStream#addStreamOutput(_, type: .screen, ...)
, console shows this error:
[ERROR] _SCStream_RemoteVideoQueueOperationHandlerWithError:701 stream output NOT found. Dropping frame
currently I'm setting SCStreamConfiguration#minimumFrameInterval
to large value (e.g. 0.1fps) as workaround, but it would be good if i can completely disable screen capture for best performance.
there is any way to disable screen capture and only captures apps audio?
finally We have a solution... for macOS 14.2 or later (but it isn't ScreenCaptureKit).
you can use AudioHardwareCreateProcessTap
https://developer.apple.com/documentation/coreaudio/4160724-audiohardwarecreateprocesstap .
somewhat developer.apple.com doesn't have a any description, but SDK header files does. so all your need is read header file, instead of developer.apple.com/documentation
or you might be want to read example source code, https://github.com/insidegui/AudioCap (note: this isn't mine project)
well, it still lacks some features (on Public API), like get current permission status.
If your app aren't on App Store, you might be able to use TCC private API instead, but cleary not recommended.