Skip to content

fix: add close() to AudioResampler to release native handle#638

Open
LautaroPetaccio wants to merge 2 commits intolivekit:mainfrom
LautaroPetaccio:fix/audio-resampler-close
Open

fix: add close() to AudioResampler to release native handle#638
LautaroPetaccio wants to merge 2 commits intolivekit:mainfrom
LautaroPetaccio:fix/audio-resampler-close

Conversation

@LautaroPetaccio
Copy link
Copy Markdown

Why

AudioResampler creates an FfiHandle in its constructor but exposes no close() or dispose() method. Every resampler instance leaks its native handle for the lifetime of the process. Unlike AudioSource and VideoSource which both have close() methods, the resampler had no way to release its resources.

How

Add a public close() method that calls this.#ffiHandle.dispose(), following the same pattern as AudioSource.close() and VideoSource.close().

@changeset-bot
Copy link
Copy Markdown

changeset-bot bot commented Apr 1, 2026

🦋 Changeset detected

Latest commit: e77258e

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@livekit/rtc-node Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

Copy link
Copy Markdown

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

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.

1 participant