Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

When my Mac connects to AirPods, starting recording fails. #128

Open
ysnows opened this issue Apr 28, 2024 · 6 comments
Open

When my Mac connects to AirPods, starting recording fails. #128

ysnows opened this issue Apr 28, 2024 · 6 comments
Labels
bug Something isn't working help wanted Extra attention is needed

Comments

@ysnows
Copy link

ysnows commented Apr 28, 2024

System Env:


MacBook Pro 16-inch, 2021

Chip Apple M1 Max

Memory 32 GB 14.3.1 macOS

Error Message:

throwing -10877

HALB_IOThread::_Start: there already is a thread HALB_IOThread.cpp:323
image
@ZachNagengast ZachNagengast added bug Something isn't working help wanted Extra attention is needed labels Apr 28, 2024
@ZachNagengast
Copy link
Contributor

Thanks for reporting, this issue has been noticed by some others as well. @cgfarmer4 any thoughts? We definitely need a way to fix this because it's a pretty common use case.

@cgfarmer4
Copy link
Contributor

cgfarmer4 commented Apr 29, 2024

Hey @ZachNagengast -- thanks for the tag here. I can reproduce. The issue doesn't seem isolated to Airpods, but for all bluetooth headsets. Or at least the 2 others I tried besides my Airpods.

From poking around the web, I see a lot of issues pointing to AVAudioEngine + Bluetooth problems but nothing sticks out as a way forward unfortunately.

@cgfarmer4
Copy link
Contributor

cgfarmer4 commented Apr 29, 2024

One idea is that if there is some detection of a bluetooth device (not sure how to query this), we could omit the assign input function. 2 other options are:

  1. Remove the feature.
  2. Switch to using AVCaptureSession instead of AVAudioEngine.

@Abhinay1997
Copy link
Contributor

@cgfarmer4 I have yet to try with a wired device yet but this might be related avaudioengine-crashes-when-plug-headphones-in-or-out

The thread recommends subscribing to the event AVAudioEngineConfigurationChangeNotification and updating the audio nodes. I think this should also be triggered for the bluetooth device getting connected. Thoughts ?

@cgfarmer4
Copy link
Contributor

Decent idea if you want to flip the microphone while you're recording and a good improvement regardless. However, the App doesn't actually crash, it just causes AVAudioEngine to interpret the input in a way that is not compatible and throws warnings. Ive found it doesn't work right even if you start the app with Airpods sometimes.

@Abhinay1997
Copy link
Contributor

Ah I assumed the issue popped up when the app was already recording. I understand what you mean now. That's weird behaviour 🤔

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

4 participants