Skip to content

Max/android platformaudio register callback backfill - #1257

Open
MaxHeimbrock wants to merge 3 commits into
mainfrom
max/android-platformaudio-register-callback-backfill
Open

Max/android platformaudio register callback backfill#1257
MaxHeimbrock wants to merge 3 commits into
mainfrom
max/android-platformaudio-register-callback-backfill

Conversation

@MaxHeimbrock

@MaxHeimbrock MaxHeimbrock commented Jul 15, 2026

Copy link
Copy Markdown
Contributor

@github-actions

github-actions Bot commented Jul 15, 2026

Copy link
Copy Markdown
Contributor

Changeset ✓

This PR includes a changeset covering all affected packages:

Package Bump
libwebrtc patch
livekit patch
livekit-ffi patch
webrtc-sys patch

MaxHeimbrock and others added 2 commits August 14, 2026 10:38
…xists

On Android the platform ADM is created lazily in EnsurePlatformAdmCreated(),
so it usually does not exist yet when WebRTC performs its one-time
AdmProxy::RegisterAudioCallback() registration. In that case the audio
transport is only wired to the synthetic ADM; if the app later constructs
PlatformAudio the platform ADM is created and started but never receives the
transport, running indefinitely while writing silence.

This failure mode is otherwise completely silent -- WebRTC, the Android audio
HAL, and dumpsys all report a healthy pipeline -- so add a warning log to make
it diagnosable from logs alone.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
AdmProxy::RegisterAudioCallback() is called once, early, by WebRTC's engine
and only forwards the real AudioTransport to ADMs that already exist. On
Android the platform ADM is created lazily in EnsurePlatformAdmCreated() on the
app's first AcquirePlatformAdm() (deferred for JNI readiness), which normally
happens after registration. The platform ADM was therefore created and started
successfully but with no transport wired up, running indefinitely while writing
silence -- total silence for both mic capture and remote playout, with a fully
healthy-looking pipeline everywhere (WebRTC, Android audio HAL, dumpsys).

Backfill the registration in EnsurePlatformAdmCreated() after Init() succeeds,
using the transport retained in audio_transport_. Also soften the diagnostic
added in the previous commit from a warning to an info log, since with the
backfill in place a null platform_adm_ at registration time is the normal,
handled path (and is always expected for synthetic-only usage).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@MaxHeimbrock
MaxHeimbrock force-pushed the max/android-platformaudio-register-callback-backfill branch from f1f52cd to ed63339 Compare August 14, 2026 08:38
@MaxHeimbrock
MaxHeimbrock marked this pull request as ready for review August 14, 2026 08:38
@MaxHeimbrock
MaxHeimbrock requested a review from ladvoc as a code owner August 14, 2026 08:38

@devin-ai-integration devin-ai-integration Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ Devin Review: No Issues Found

Devin Review analyzed this PR and found no potential bugs to report.

View in Devin Review to see 1 additional finding.

Open in Devin Review

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Android PlatformAudio silent

1 participant