Skip to content

fix(meet-bot): normalize reconnect-reset threshold to audio duration#26509

Merged
siddseethepalli merged 1 commit into
mainfrom
swarm/rv1p/task-7
Apr 18, 2026
Merged

fix(meet-bot): normalize reconnect-reset threshold to audio duration#26509
siddseethepalli merged 1 commit into
mainfrom
swarm/rv1p/task-7

Conversation

@siddseethepalli

@siddseethepalli siddseethepalli commented Apr 18, 2026

Copy link
Copy Markdown
Contributor

Derive the stability threshold from rateHz/frameBytes so it's consistent across custom audio modes.

Addresses feedback on #26463.


Open in Devin Review

@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 found 1 potential issue.

View 1 additional finding in Devin Review.

Open in Devin Review

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.

🚩 Pre-existing incorrect frame duration in comments (10ms, not 20ms)

Multiple pre-existing comments claim that 320 bytes at 16kHz s16le mono is a "20ms frame" (lines 12 and 44–46), but the actual duration is 10ms: 320 bytes / 2 bytes-per-sample = 160 samples, and 160 / 16000 Hz = 0.01s = 10ms. A true 20ms frame at 16kHz would be 640 bytes. This doesn't affect runtime behavior (the frame size in bytes is what matters, not the label), but the misleading comments were the source of the old MIN_FRAMES_TO_RESET_BUDGET = 100 being set to half the intended value — the author likely computed 100 frames × "20ms" = 2s, when it was actually 100 × 10ms = 1s. The new PR's formula sidesteps this confusion entirely by computing from first principles, which is a clear improvement.

(Refers to lines 44-47)

Open in Devin Review

Was this helpful? React with 👍 or 👎 to provide feedback.

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.

1 participant