Skip to content
This repository was archived by the owner on Jul 2, 2025. It is now read-only.

Comments

* Remove onaudioprocess event handler before processor has been deleted.#1

Merged
a8568730 merged 2 commits intomasterfrom
fix-recbuffer-undefined
May 20, 2022
Merged

* Remove onaudioprocess event handler before processor has been deleted.#1
a8568730 merged 2 commits intomasterfrom
fix-recbuffer-undefined

Conversation

@a8568730
Copy link

@a8568730 a8568730 commented May 20, 2022

因為原底若kā錄音擋起來,console會跳錯誤 "TypeError: recBuffers.push is undefined"。
原專案 PR #37 有人講是 race condition。

if (this.isRecording()) {
this.input.disconnect();
this.processor.disconnect();
this.processor.onaudioprocess = null;

Choose a reason for hiding this comment

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

這影響著sannh?

Copy link
Author

@a8568730 a8568730 May 20, 2022

Choose a reason for hiding this comment

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

我認為是為著 https://github.com/i3thuan5/web-audio-recorder-js/blob/master/lib/WebAudioRecorder.js#L98-L102 onaudioprocess 內底有送信號 worker.postMessage({ command: "record", buffer: buffer });,叫後壁錄音。

@a8568730
Copy link
Author

a8568730 commented May 20, 2022

另外發現歹消息,套件內底 createScriptProcessor beh pha-sé--ah。

This feature was replaced by [AudioWorklets](https://developer.mozilla.org/en-US/docs/Web/API/AudioWorklet and the AudioWorkletNode interface.

@a8568730 a8568730 merged commit 3b99ac4 into master May 20, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants