Show HN: HDMI 볼륨 조절 문제를 해결하기 위해 macOS용 C++ 오디오 드라이버를 작성했습니다

hackernews | | 📦 오픈소스
#c++ #hdmi #macos #오디오 드라이버 #오픈소스
원문 출처: hackernews · Genesis Park에서 요약 및 분석

요약

이 프로그램은 macOS에서 HDMI나 DisplayPort 연결 모니터의 볼륨이 조절되지 않는 문제를 해결하기 위해 고안된 오픈소스 가상 오디오 드라이버입니다. C++로 작성된 HAL 가상 드라이버와 SwiftUI 기반의 메뉴 바 앱을 통해 소프트웨어적으로 볼륨 제어, 음소거 기능, 10밴드 파라메트릭 EQ를 제공합니다. 커널 확장이 필요 없는 가벼운 구조로, 애플 실리콘과 인텔 맥을 모두 지원하며 macOS 13.0 이상 환경에서 자동으로 장치를 감지합니다.

본문

A free, open-source macOS system-wide volume controller for HDMI and DisplayPort monitors. Download · How It Works · Build Many external monitors connected via HDMI or DisplayPort have fixed-volume audio output — macOS shows the volume slider grayed out. SoundBridge solves this by inserting a virtual audio driver between your apps and the physical device, giving you full software volume control through the menu bar. No kernel extensions. No background daemons you can't see. Just a lightweight menu bar app. - System-wide volume control for fixed-volume HDMI/DisplayPort audio - Menu bar app with volume slider and mute toggle - Keyboard volume keys work as expected - 10-band parametric EQ with preset support - Automatic device detection and hot-plug support - Universal binary (Apple Silicon + Intel) - Guided onboarding with one-click driver install - Auto-update via Sparkle - Code signed and notarized - macOS 13.0+ (Ventura) or later - HDMI or DisplayPort audio output - Download the latest .dmg from Releases - Drag SoundBridge.app to Applications - Launch SoundBridge — the onboarding wizard will guide you through driver installation - Your HDMI/DisplayPort audio device will appear with a working volume slider To uninstall, use the "Uninstall" option in the SoundBridge menu bar dropdown. SoundBridge uses a four-component architecture: ┌─────────────────┐ ┌──────────────────────┐ shared memory ┌─────────────────┐ ┌─────────────────┐ │ Menu Bar App │────▶│ HAL Virtual Driver │◀──────────────────▶│ Host Engine │────▶│ Physical Device │ │ (SwiftUI) │ │ (C++ CoreAudio) │ /tmp/soundbridge │ (Swift) │ │ (HDMI/DP) │ └─────────────────┘ └──────────────────────┘ └─────────────────┘ └─────────────────┘ UI controls Proxy device DSP + rendering volume/mute captures audio gain + EQ | Component | Language | Location | Role | |---|---|---|---| | App | Swift / SwiftUI | apps/mac/SoundBridgeApp/ | Menu bar UI, onboarding, driver installer, volume control via CoreAudio API | | Driver | C++ | packages/driver/ | HAL plugin that creates virtual proxy devices, captures audio into shared memory ring buffers | | Host | Swift | packages/host/ | Background process that reads from shared memory, applies gain/DSP, renders to physical hardware | | DSP | C/C++ | packages/dsp/ | 10-band parametric EQ engine with C ABI, used by Host via Objective-C++ bridge | - macOS routes audio to the SoundBridge proxy device (appears as "Device via SoundBridge") - The HAL driver writes audio frames into a shared memory ring buffer ( /tmp/soundbridge- ) - The Host process reads from the ring buffer, applies software gain (from the volume slider) and optional EQ - Processed audio is rendered to the real physical output device Volume control uses CoreAudio's kAudioDevicePropertyVolumeScalar on the proxy device. The driver stores the value in shared memory, and the Host applies it as a linear gain multiplier with smoothing to avoid clicks. SoundBridge/ ├── apps/mac/SoundBridgeApp/ # SwiftUI menu bar application │ └── Sources/ │ ├── App/ # App entry point, lifecycle │ ├── Views/ # MenuBarView, SettingsWindow, Onboarding │ ├── Services/ # VolumeController, IPCController, DriverInstaller │ └── Resources/ # Icons, fonts, images ├── packages/ │ ├── driver/ # CoreAudio HAL virtual driver (C++) │ │ ├── src/Plugin.cpp # Driver runtime logic │ │ ├── include/ # RFSharedAudio.h (shared memory protocol) │ │ └── vendor/libASPL/ # HAL plugin C++ wrapper │ ├── host/ # Background audio host (Swift) │ │ └── Sources/ │ │ └── SoundBridgeHost/ │ │ ├── Audio/ # AudioRenderer, AudioEngine │ │ ├── Devices/ # DeviceDiscovery, DeviceRegistry │ │ └── Services/ # SharedMemoryManager, DSPProcessor │ └── dsp/ # DSP engine (C/C++) │ ├── include/ # Public C API │ ├── src/ # Biquad filters, limiter, engine │ ├── bridge/ # Objective-C++ wrapper for Swift │ └── tests/ # 33 automated tests ├── tools/ # Build, sign, notarize, DMG scripts ├── Makefile # Development shortcuts └── .github/workflows/ # Release CI (build + sign + notarize + DMG) - macOS 13.0 (Ventura) or later - Xcode Command Line Tools ( xcode-select --install ) - CMake ( brew install cmake ) - Git (for submodule management) 检查依赖是否就绪: make install-deps 项目依赖 git submodule(HAL 驱动使用的 libASPL 库),克隆后必须初始化: git clone https://github.com/chenjy16/SoundBridge.git cd SoundBridge git submodule update --init --recursive ⚠️ 如果跳过 submodule 初始化,构建 HAL Driver 时会报错:does not contain a CMakeLists.txt file 。 # 构建所有组件(DSP、Driver、Host、App),输出 universal binary(arm64 + x86_64) make build # 运行应用 make run make build 会自动完成以下步骤: - 从 git tag 更新版本号到各组件的 Info.plist / CMakeLists.txt - 构建 DSP 库(C++,universal) - 构建 HAL 虚拟驱动(C++,universal,依赖 libASPL) - 构建 Audio Host(Swift,universal) - 构建 Menu Bar App(Swift,universal) - 创建 dist/SoundBridge.app 应用包 构建产物位于 dist/SoundBridge.app 。 | 命令 | 说明 | |---|---| make build | 构建所有组件(DSP、Driver、Host、App) | make bundle | 仅创建 .app 包(需先 build) | make run | 运行已构建的应用 | make dev | 重置状态 + 构建 + 运行(完整的开发流程,会触发 onboarding) | make clean | 清理所有构建

Genesis Park 편집팀이 AI를 활용하여 작성한 분석입니다. 원문은 출처 링크를 통해 확인할 수 있습니다.

공유

관련 저널 읽기

전체 보기 →