We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent a6ebd81 commit e1a0780Copy full SHA for e1a0780
3 files changed
.changeset/selfish-moons-tie.md
@@ -0,0 +1,6 @@
1
+---
2
+"example-publish-wav": patch
3
+"@livekit/rtc-node": patch
4
5
+
6
+Fix memory leak of AudioSource
examples/publish-wav/index.ts
@@ -64,6 +64,7 @@ while (written < dataSize) {
64
}
65
await source.waitForPlayout();
66
// release resources allocated for audio publishing
67
+await track.close();
68
await source.close();
69
70
await room.disconnect();
packages/livekit-rtc/src/track.ts
@@ -45,6 +45,10 @@ export abstract class Track {
45
get muted(): boolean | undefined {
46
return this.info?.muted;
47
48
49
+ async close() {
50
+ this.ffi_handle.dispose();
51
+ }
52
53
54
export class LocalAudioTrack extends Track {
0 commit comments