Skip to content

Conversation

@hiroshihorie
Copy link
Member

@hiroshihorie hiroshihorie commented Sep 16, 2025

Audio Engine Availability Control:

  • Added AudioEngineAvailability struct and related conversion extensions in AudioEngineAvailability.swift to represent and manage input/output availability for the audio engine.
  • Introduced setEngineAvailability(_:) and engineAvailability API to AudioManager, providing high-priority control over the engine's running state.
  • Updated publishing logic in LocalParticipant to only wait for audio frames if input is available, respecting the new availability controls.

Testing and Documentation:

  • Added AudioEngineAvailabilityTests to verify that the audio engine stops and resumes correctly when availability is toggled, ensuring robust behavior.
  • Added a helper sleep extension to LKTestCase to support async test scenarios.

Dependency Updates:

  • Updated LiveKitWebRTC dependency to version 137.7151.08 in LiveKitClient.podspec, Package.swift, and [email protected] to support the new audio engine availability features. [1] [2] [3]

Other minor changes include internal test updates to use ObjCBool for engine state properties.

@github-actions
Copy link

github-actions bot commented Sep 16, 2025

⚠️ This PR does not contain any files in the .changes directory.

Copy link
Contributor

@pblazej pblazej left a comment

Choose a reason for hiding this comment

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

LGTM

@hiroshihorie hiroshihorie changed the title Run-time pause / resume of audio engine Add audio engine availability control Sep 23, 2025
@hiroshihorie hiroshihorie merged commit 8b44810 into main Sep 23, 2025
37 of 43 checks passed
@hiroshihorie hiroshihorie deleted the hiroshi/audio-engine-io-perms branch September 23, 2025 15:41
hiroshihorie added a commit to livekit-examples/swift-example-collection that referenced this pull request Sep 23, 2025
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.

3 participants