diff options
author | MetaMuffin <metamuffin@yandex.com> | 2021-08-06 15:48:09 +0200 |
---|---|---|
committer | MetaMuffin <metamuffin@yandex.com> | 2021-08-06 15:48:09 +0200 |
commit | c5f4438589be44208ce4946c3c090350840113ba (patch) | |
tree | 12dce24038ef6a2e712b236e14cb2e06408c00b0 /source/client/rnnoise.ts | |
parent | fe66a0b23dafd562fc50ddfe5ba326ee33872c24 (diff) | |
download | keks-meet-c5f4438589be44208ce4946c3c090350840113ba.tar keks-meet-c5f4438589be44208ce4946c3c090350840113ba.tar.bz2 keks-meet-c5f4438589be44208ce4946c3c090350840113ba.tar.zst |
fixed firefox specific bug
Diffstat (limited to 'source/client/rnnoise.ts')
-rw-r--r-- | source/client/rnnoise.ts | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/source/client/rnnoise.ts b/source/client/rnnoise.ts index 6bd632e..6017288 100644 --- a/source/client/rnnoise.ts +++ b/source/client/rnnoise.ts @@ -10,9 +10,10 @@ declare global { } +// TODO fix leak export async function rnnoise_track(track: MediaStreamTrack): Promise<MediaStreamTrack> { log("misc", "rnnoise enabled") - const context = new AudioContext({ sampleRate: 48000 }) + const context = new AudioContext() //@ts-ignore let RNNoiseNode: typeof RNNoiseNode = window.RNNoiseNode; @@ -38,8 +39,6 @@ export async function rnnoise_track(track: MediaStreamTrack): Promise<MediaStrea const rnnoise = new RNNoiseNode(context) source.connect(rnnoise) rnnoise.connect(destination) - // rnnoise.onstatus = console.log - // rnnoise.update(true) return destination.stream.getAudioTracks()[0] }
\ No newline at end of file |