Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 10 additions & 1 deletion Client/macos/HeadphonesBridge.mm
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ - (BOOL)adaptiveVolume { return _hp && _hp->getAdaptiveVolume(); }

static BOOL SHCLooksLikeSonyHeadset(NSString *name) {
if (name.length == 0) return NO;
NSArray<NSString *> *prefixes = @[@"WH-", @"WF-", @"WI-", @"MDR-", @"XB", @"LinkBuds"];
NSArray<NSString *> *prefixes = @[@"WH-", @"WF-", @"WI-", @"MDR-", @"XB", @"LinkBuds", @"ULT"];
for (NSString *p in prefixes) {
if ([name hasPrefix:p] || [name containsString:p]) return YES;
}
Expand All @@ -141,6 +141,15 @@ - (void)scanAndConnectWithCompletion:(void (^)(BOOL, NSString * _Nullable))compl
break;
}
}
// BLE/audio-only headsets (e.g. ULT WEAR) report isConnected == NO; fall back to any paired Sony headset.
if (!device) {
for (IOBluetoothDevice *paired in [IOBluetoothDevice pairedDevices]) {
if (SHCLooksLikeSonyHeadset([paired name])) {
device = paired;
break;
}
}
}

if (!device) {
// Fall back to the native picker if we can't auto-identify a connected Sony device.
Expand Down