fix(macos): lazy-init AVAudioEngine to prevent Bluetooth audio ducking#31
Merged
steipete merged 2 commits intoopenclaw:mainfrom Dec 16, 2025
Merged
Conversation
Creating AVAudioEngine at singleton init time causes macOS to switch Bluetooth headphones from A2DP (high quality) to HFP (headset) profile, resulting in degraded audio quality even when Voice Wake is disabled. This change makes audioEngine optional and only creates it when voice recognition actually starts, preventing the profile switch for users who don't use Voice Wake. Fixes openclaw#30 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
0221060 to
bcc5d78
Compare
Contributor
|
Thanks @Nachx639 — this is a great catch.\n\nI rebased the PR onto |
All Bridgebuilder Review Findings Addressed ✅Pushed CRITICAL
HIGH
MEDIUM
LOW
All 391 tests pass across persistence (174), safety (156), boot (47), and workflow (14) suites. |
4 tasks
4p0hk
pushed a commit
to 4p0hk/clawpok_base
that referenced
this pull request
Feb 16, 2026
5 tests: react/remove, read/paginate, edit, delete, pin/unpin against live mattermost server via mm-test. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
frodo-harborbot
added a commit
to harborworks/openclaw
that referenced
this pull request
Feb 16, 2026
Based on harborworks/.openclaw config. Includes: - Auth profile for Anthropic - Agent defaults: opus model, main agent with workspace - Telegram channel config (bot token from env) - Telegram plugin enabled - Tool sandbox allowlist - Brave web search config - Gateway auth token from env - Heartbeat disabled by default (0m)
dalefrieswthat
pushed a commit
to dalefrieswthat/openclaw
that referenced
this pull request
Feb 25, 2026
…ss (openclaw#31) * test(discord): align loadConfig mock signature with source * fix: async agent delegation — config bug, pruning, observability, normalization, prompts - Fix maxPerCall config bug: broker was reading maxConcurrency for both limits; add dedicated maxPerCall field to VoiceCallSubagentConfigSchema - Replace O(n) pruning on every state transition with lazy threshold-based pruning (amortized via PRUNE_THRESHOLD=16) - Add BrokerMetrics type and metrics getter for observability: enqueued, completed, failed, expired, canceled, fallbacksSpoken, repairAttempts, repairSuccesses, totalExecutionMs - Improve JSON normalization pipeline: strip markdown fences, trailing commas, single-line comments; case-insensitive key matching; expanded alias sets; export extractFirstJsonObject, parseBoolean, parseNumber - Lighten repairPayload: thinkLevel=off, 4s timeout, truncate input to 1000 chars, pass context through to avoid redundant loadCoreAgentDeps - Clean up orphaned session store entries and temp files after job completion (finally block with fs.unlinkSync) - Move foreground envelope prompt to end of system prompt with structured RESPONSE FORMAT heading; wrap conversation history in XML tags - Add specialist-specific prompts (SPECIALIST_PROMPTS map) for research, scheduler, and policy roles - Expand test coverage: 55 tests across broker and normalization suites covering pruning, metrics, deadline clamping, JSON extraction edge cases, alias resolution, type coercion, and specialist prompts https://claude.ai/code/session_01SYcKJe4ySZthJSCkKxzbFZ * fix: guard fallback rejection, fix deadline overrun, resolve prompt conflict - Wrap speakFallbackIfActive in try/catch inside the runJob catch block to prevent unhandled promise rejections when onSummaryReady is broken - Check remaining time before applying Math.max(1000ms) clamp so jobs that have already expired hit the expiry branch instead of launching a 1s LLM call past their deadline - Replace "use tools when helpful" with delegation guidance in the foreground voice prompt to avoid contradicting the JSON-only envelope instruction — tools belong in the specialist background lane https://claude.ai/code/session_01SYcKJe4ySZthJSCkKxzbFZ * fix: JSON-aware trailing comma/comment repair, session orphan prevention Replace naive regex-based stripTrailingCommas and stripJsonComments with character-walking implementations that track whether we're inside a JSON string literal, so commas and // sequences inside string values are never corrupted. Move session store cleanup into the finally block of runJob so entries are removed on both success and failure paths. Add reapOrphanedSessions() method that sweeps stale voice-subagent:* keys older than a configurable threshold, called at webhook server startup to catch entries orphaned by crashes. https://claude.ai/code/session_01SYcKJe4ySZthJSCkKxzbFZ --------- Co-authored-by: Claude <noreply@anthropic.com>
zooqueen
referenced
this pull request
in hanzoai/bot
Feb 25, 2026
) Route all Linux CI jobs to self-hosted runners (hanzo-k8s label) on our DOKS cluster instead of GitHub-hosted ubuntu-latest. This eliminates queue wait times and runs jobs on dedicated infrastructure. Migrated workflows: ci.yml (8 jobs), workflow-sanity.yml, install-smoke.yml, formal-conformance.yml, labeler.yml, auto-response.yml, stale.yml. Kept on GitHub runners: Android (needs JDK/Gradle/SDK), Windows (needs Windows OS), macOS (needs Xcode/Swift), Docker release (needs Docker), npm release (needs registry). Adjusted test parallelism: BOT_TEST_WORKERS=1 for 4GiB runner pods. Runners: 3x github-runner + 2x github-runner-build pods in actions-runner-system namespace, org-scoped for hanzoai. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
songliu0403-rgb
pushed a commit
to songliu0403-rgb/openclaw
that referenced
this pull request
Feb 26, 2026
elliot-ylambda
added a commit
to elliot-ylambda/magister-openclaw
that referenced
this pull request
Mar 7, 2026
heatherstew44-maker
pushed a commit
to heatherstew44-maker/openclaw
that referenced
this pull request
Mar 8, 2026
Fix the keycode bug
Piboonsak
added a commit
to Piboonsak/openclaw_github
that referenced
this pull request
Mar 9, 2026
LyleLiu666
added a commit
to LyleLiu666/openclaw-upstream-fork
that referenced
this pull request
Mar 10, 2026
* Agents: respect reasoning on OpenAI WS * Agents: avoid implicit WS reasoning summaries --------- Co-authored-by: Lyle <lyle@example.com>
4 tasks
lucasmpramos
added a commit
to butley/openclaw
that referenced
this pull request
Mar 10, 2026
Co-authored-by: Bob
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
audioEngineoptional inVoiceWakeRuntimeandVoicePushToTalkProblem
When Clawdis launches, it creates
AVAudioEngine()instances at singleton init time (even with Voice Wake disabled). This causes macOS to switch Bluetooth headphones from A2DP (high quality stereo) to HFP (headset profile), resulting in noticeably degraded audio quality.Solution
Make the
AVAudioEngineproperty optional and lazy-initialize it only whenstart()is called. This way, users who don't use Voice Wake won't experience the Bluetooth profile switch.Testing
Fixes #30
🤖 Generated with Claude Code