Skip to content

[Option B] Create CoreAudioHardwareProvider implementation #29

Description

@danieljsinclair

Issue

Create CoreAudioHardwareProvider implementing IAudioHardwareProvider for macOS platform.

Background

Current AudioPlayer uses CoreAudio AudioUnit directly. We need to extract platform-specific code into a dedicated provider class.

Goal

Create CoreAudioHardwareProvider that:

  • Implements IAudioHardwareProvider interface
  • Uses CoreAudio AudioUnit for audio playback on macOS
  • Provides clean platform abstraction
  • Supports callback registration for audio rendering

Implementation Plan

  1. Create CoreAudioHardwareProvider.h/cpp implementing IAudioHardwareProvider
  2. Extract AudioUnit setup from AudioPlayer::setupAudioUnit()
  3. Extract AudioUnit callback from AudioPlayer::audioUnitCallback()
  4. Implement all IAudioHardwareProvider methods
  5. Manage AudioUnit lifecycle internally

Acceptance Criteria

  1. CoreAudioHardwareProvider.h/cpp created implementing IAudioHardwareProvider
  2. Initializes AudioUnit with specified sample rate and buffer size
  3. Supports start/stop playback
  4. Supports volume control
  5. Supports audio callback registration
  6. All existing AudioPlayer tests pass
  7. Clean build with no warnings

Testing

  • Unit tests for CoreAudioHardwareProvider
  • Integration tests with AudioPlayer
  • All smoke tests pass
  • No behavioral changes (audio sounds identical)

Dependencies

Related Issues

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions