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

Failure with AirPods Pro on MacOS #347

Open
sami-uga opened this issue Jun 7, 2024 · 4 comments
Open

Failure with AirPods Pro on MacOS #347

sami-uga opened this issue Jun 7, 2024 · 4 comments
Labels
bug Something isn't working macOS Only affects macOS
Milestone

Comments

@sami-uga
Copy link

sami-uga commented Jun 7, 2024

I was trying to create a pipeline for a pair of AirPods Pro on MacOS using the following simplified config file. The config file works on other output devices. It does not work on AirPods Pro. camilladsp stops working with an error message in the log as shown below. Am I doing something wrong or could this be an actual issue?

devices:
  samplerate: 44100
  chunksize: 4096
  capture:
    type: CoreAudio
    channels: 2
    device: BlackHole 2ch
    format: FLOAT32LE
  playback:
    type: CoreAudio
    channels: 2
    device: AirPods Pro - Find My
    format: FLOAT32LE
mixers:
  stereo:
    channels:
      in: 2
      out: 2
    mapping:
    - dest: 0
      sources:
      - channel: 0
        gain: 0
    - dest: 1
      sources:
      - channel: 1
        gain: 0
pipeline:
- type: Mixer
  name: stereo

Following is the log.

2024-06-06 01:28:12.290231 DEBUG [src/processing.rs:19] build filters, waiting to start processing loop
2024-06-06 01:28:12.292813 ERROR [src/bin.rs:286] Playback error: Invalid property value
2024-06-06 01:28:12.292818 DEBUG [src/bin.rs:291] Error while starting, release barrier
2024-06-06 01:28:12.293190 DEBUG [src/coreaudiodevice.rs:261] Available capture devices: ["AirPods Pro - Find My", "BlackHole 2ch", "MacBook Pro Microphone", "BoomAudio", "Microsoft Teams Audio"]
2024-06-06 01:28:12.310703 DEBUG [src/coreaudiodevice.rs:306] Set phys capture stream format
2024-06-06 01:28:12.311024 DEBUG [src/coreaudiodevice.rs:318] Set capture stream format
2024-06-06 01:28:12.318060 DEBUG [src/coreaudiodevice.rs:332] Opened CoreAudio capture device Some("BlackHole 2ch")
2024-06-06 01:28:12.318648 DEBUG [src/coreaudiodevice.rs:1096] Capture device has 2 clock sources
2024-06-06 01:28:12.319147 DEBUG [src/coreaudiodevice.rs:1120] Available capture device clock source ids: [0, 1], names: ["Internal Fixed", "Internal Adjustable"]
2024-06-06 01:28:12.319152 INFO [src/coreaudiodevice.rs:1172] The capture device supports pitch control
2024-06-06 01:28:12.319154 DEBUG [src/coreaudiodevice.rs:1016] Changing capture device clock source to item with index 1
2024-06-06 01:28:12.319762 DEBUG [src/coreaudiodevice.rs:748] Capture device ready and waiting
2024-06-06 01:28:12.319773 DEBUG [src/coreaudiodevice.rs:754] Capture device starts now!
2024-06-06 01:28:12.319777 DEBUG [src/processing.rs:21] Processing loop starts now!
2024-06-06 01:28:12.319783 DEBUG [src/bin.rs:294] Wait for capture thread to exit..
2024-06-06 01:28:12.330922 DEBUG [src/coreaudiodevice.rs:766] Exit message received, sending EndOfStream
2024-06-06 01:28:12.330945 INFO [src/processing.rs:37] Playback thread has already stopped.
2024-06-06 01:28:12.362244 DEBUG [src/bin.rs:1038] Processing ended with status Ok(Restart)
2024-06-06 01:28:12.362257 DEBUG [src/bin.rs:1052] Restarting with new config
2024-06-06 01:28:12.362259 DEBUG [src/bin.rs:994] Wait for config
2024-06-06 01:28:12.362261 DEBUG [src/bin.rs:1004] Wait mode is disabled, there are no queued commands, and no new config. Exiting.
@HEnquist
Copy link
Owner

HEnquist commented Jun 7, 2024

This is probably the same issue I fixed a while ago, in the next30 branch that will become v3.0 soon-ish. Could you try it?

@sami-uga
Copy link
Author

@HEnquist I tried. Now it fails with a different log message.

2024-06-10 23:45:49.897299 INFO [src/bin.rs:676] CamillaDSP version 3.0.0
2024-06-10 23:45:49.897371 INFO [src/bin.rs:677] Running on macos, aarch64
2024-06-10 23:45:49.897390 DEBUG [src/bin.rs:715] Loaded state: None
2024-06-10 23:45:49.897395 DEBUG [src/bin.rs:724] Using default initial volume
2024-06-10 23:45:49.897398 DEBUG [src/bin.rs:741] Using default initial mute
2024-06-10 23:45:49.897400 DEBUG [src/bin.rs:751] Initial mute: [false, false, false, false, false]
2024-06-10 23:45:49.897403 DEBUG [src/bin.rs:752] Initial volume: [0.0, 0.0, 0.0, 0.0, 0.0]
2024-06-10 23:45:49.897407 DEBUG [src/bin.rs:754] Read config file Some("/Users/samiyuru/Applications/CamillaDSP/airpods_no_eq.yml")
2024-06-10 23:45:49.897694 DEBUG [src/bin.rs:794] Config is valid
2024-06-10 23:45:49.897760 DEBUG [src/socketserver.rs:443] Start websocket server on 127.0.0.1:1234
2024-06-10 23:45:49.897783 DEBUG [src/bin.rs:983] Wait for config
2024-06-10 23:45:49.897786 DEBUG [src/bin.rs:999] Waiting to receive a command
2024-06-10 23:45:49.897789 DEBUG [src/bin.rs:1002] Config change command received
2024-06-10 23:45:49.897791 DEBUG [src/bin.rs:988] New config is available and there are no queued commands, continuing
2024-06-10 23:45:49.897792 DEBUG [src/bin.rs:1025] Config ready, start processing
2024-06-10 23:45:49.897848 DEBUG [src/bin.rs:157] Using channels [true, true]
2024-06-10 23:45:49.897866 DEBUG [src/filters.rs:312] Build new pipeline
2024-06-10 23:45:49.898036 DEBUG [src/filters.rs:322] Add Mixer step with mixer stereo, pipeline becomes 2 channels wide
2024-06-10 23:45:49.898043 DEBUG [src/processing.rs:19] build filters, waiting to start processing loop
2024-06-10 23:45:49.898010 DEBUG [src/coreaudiodevice.rs:668] Using a capture channel capacity of 65 buffers.
2024-06-10 23:45:49.897872 DEBUG [src/coreaudiodevice.rs:392] Using a playback channel capacity of 3 chunks.
2024-06-10 23:45:50.145100 DEBUG [src/coreaudiodevice.rs:286] Available capture devices: ["AirPods Pro - Sami - Find My", "BlackHole 2ch", "MacBook Pro Microphone", "BoomAudio", "Microsoft Teams Audio"]
2024-06-10 23:45:50.149719 ERROR [src/bin.rs:286] Playback error: Failed to find matching physical playback format
2024-06-10 23:45:50.149725 DEBUG [src/bin.rs:291] Error while starting, release barrier
2024-06-10 23:45:50.162276 DEBUG [src/coreaudiodevice.rs:331] Set phys capture stream format
2024-06-10 23:45:50.162554 DEBUG [src/coreaudiodevice.rs:343] Set capture stream format
2024-06-10 23:45:50.168200 DEBUG [src/coreaudiodevice.rs:357] Opened CoreAudio capture device Some("BlackHole 2ch")
2024-06-10 23:45:50.168567 DEBUG [src/coreaudiodevice.rs:1129] Capture device has 2 clock sources
2024-06-10 23:45:50.168911 DEBUG [src/coreaudiodevice.rs:1153] Available capture device clock source ids: [0, 1], names: ["Internal Fixed", "Internal Adjustable"]
2024-06-10 23:45:50.168916 INFO [src/coreaudiodevice.rs:1205] The capture device supports pitch control
2024-06-10 23:45:50.168917 DEBUG [src/coreaudiodevice.rs:1049] Changing capture device clock source to item with index 1
2024-06-10 23:45:50.169418 DEBUG [src/coreaudiodevice.rs:782] Capture device ready and waiting
2024-06-10 23:45:50.169428 DEBUG [src/coreaudiodevice.rs:788] Capture device starts now!
2024-06-10 23:45:50.169431 DEBUG [src/processing.rs:21] Processing loop starts now!
2024-06-10 23:45:50.169438 DEBUG [src/bin.rs:294] Wait for capture thread to exit..
2024-06-10 23:45:50.178420 DEBUG [src/coreaudiodevice.rs:800] Exit message received, sending EndOfStream
2024-06-10 23:45:50.178456 INFO [src/processing.rs:37] Playback thread has already stopped.
2024-06-10 23:45:50.209374 DEBUG [src/bin.rs:1027] Processing ended with status Ok(Restart)
2024-06-10 23:45:50.209382 DEBUG [src/bin.rs:1041] Restarting with new config
2024-06-10 23:45:50.209384 DEBUG [src/bin.rs:983] Wait for config
2024-06-10 23:45:50.209385 DEBUG [src/bin.rs:993] Wait mode is disabled, there are no queued commands, and no new config. Exiting.

@HEnquist
Copy link
Owner

This is much better! The new error means that the device doesn't support the selected sample format. Either try to find one that works, or just set it to null to use whatever the device is already set to.

@sami-uga
Copy link
Author

sami-uga commented Jun 11, 2024

Thank you for the help @HEnquist. And I really appreciate your work.

I changed the samplerate to 48000 and left the playback format: FLOAT32LE. It works now. The issue seemed to be not in format: FLOAT32LE but in samplerate (after changing to next30 branch).

@HEnquist HEnquist added bug Something isn't working macOS Only affects macOS labels Jun 11, 2024
@HEnquist HEnquist added this to the 3.0 milestone Jun 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working macOS Only affects macOS
Projects
None yet
Development

No branches or pull requests

2 participants