projectM-visualizer / projectM-visualizer/frontend-sdl-cpp
[FEATURE] macOS: Implement Audio Capturing using the newer CoreAudio ProcessTap API
Nobody has claimed this yet.
- Dominant language
- C++
- Stars
- 116
- Forks
- 64
- PR merge metrics
- No merged PRs in 30d
Description
Is Your Enhancement Related to a Problem?
Currently, the projectMSDL application can only capture audio from external sources like microphones and line-in. It uses the SDL2 CoreAudio wrapper, which only provides very basic access to macOS audio APIs.
Your Suggested Enhancement
Since macOS 14.4, Apple introduces a new API in CoreAudio called "Process Taps", which enables any application to record audio from a specific application once the user allows the application to do so. The API is poorly documented, but there is a GitHub project demonstrating how to use it.
Due to how this API works, it'll require some macOS-specific changes in the UI to select the process to capture from instead of an audio device. Capturing from external sources using the standard CoreAudio API should still be possible though, so this can be implemented as a choice, e.g. a "Capture Source" dropdown or radio button with "External Input" and "Process" choices.
If a process is chosen by the user, the selected process name or executable path should be stored in the configuration file, so the same application to record from can be selected again on the next launch (as the Process Tap API uses the process ID). There should be either a fallback or user message if the selected process isn't available (either on startup or when terminated) to avoid confusion if audio capture suddenly stops working.
Alternative Solutions
No response
Additional Context
(Short) introduction to Taps in Apple's developer docs: https://developer.apple.com/documentation/coreaudio/capturing-system-audio-with-core-audio-taps?language=objc
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the SDL2 CoreAudio wrapper and compare its capture flow with the AudioCap Process Tap setup and Apple's Core Audio Taps documentation. The work is done when macOS users can choose external input or a process, persist the selected process, and receive a fallback or message when it is unavailable.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp, macos
- Domain
- audio-video-rtc, desktop
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 28/100