google / google/oboe

Bluetooth output stream cannot open in Exclusive / Low Latency (negotiated as Shared / PerfMode None)

Open
#2,350 1 comment 0 reactions 1 assignee Claimed by @greenthings View on GitHub
Dominant language
C++
Stars
4.1k
Forks
639
Avg merge
2d 23h
Merged PRs (30d)
8

Description

When a Bluetooth device is connected, the output stream requests Exclusive sharing mode and Low Latency performance mode, but the actual open result is negotiated as Shared sharing mode and PerformanceMode::None.

Is there any way to ensure Exclusive / Low Latency output when using Bluetooth devices?

Should this be handled with specific code, or does it depend on special hardware or products?

Environment

Device: (ex. Samsung Galaxy S24)

Android version: (ex. Android 16)

Oboe version: (ex. 1.8.0)

Audio API: AAudio

Bluetooth device: (ex. EPOS headset) -> aptX

Code snippet
```
oboe::AudioStreamBuilder builder;

builder.setAudioApi(oboe::AudioApi::AAudio)
.setSharingMode(oboe::SharingMode::Exclusive)
.setPerformanceMode(oboe::PerformanceMode::LowLatency)
.setFormat(oboe::AudioFormat::Float)
.setChannelCount(2)
.setSampleRate(48000)
.setFramesPerCallback(mPerFrame);

builder.openStream(&stream);
```
Observed result

The stream always opens with:

SharingMode: Shared
PerformanceMode: None

Expected behavior

The stream should open with:

SharingMode: Exclusive
PerformanceMode: LowLatency

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.