Skip to content
This repository was archived by the owner on Mar 23, 2024. It is now read-only.
This repository was archived by the owner on Mar 23, 2024. It is now read-only.

Cannot get output balance of MacBook Pro M1 Speakers #59

@jamsinclair

Description

@jamsinclair

Problem

I am unable to retrieve the output balance for the builtin speakers on my M1 MacBook Pro.

Other devices, like external headphones, are able to retrieve the balance with no issues.

Specs:

  • MacOS 12.0.1 (Monterey)
  • MacBook Pro (14-inch, 2021), Apple M1 Pro chip
  • Xcode 13.2.1

Code in Use:

import SimplyCoreAudio

let simplyCA = SimplyCoreAudio()
let device = simplyCA.defaultOutputDevice

// This works fine for both builtin and external audio devices
if let outVolume = device?.virtualMainVolume(scope: .output) {
    os_log("Current default device volume of: %F", outVolume)
}

// This works only for external audio devices, builtin speakers do not work
if let outBalance = device?.virtualMainBalance(scope: .output) {
    os_log("Current default device balance of: %F", outBalance)
}

Notes

Feels like this might be an underlying apple issue or I am just doing something stupid 😅

Also so much ❤️ for this library. The Audio APIs are a real developer pain to work with. This will help simplify a bunch of code in my app.

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