Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix #133 #136

Merged
merged 5 commits into from
Sep 9, 2024
Merged

Fix #133 #136

merged 5 commits into from
Sep 9, 2024

Conversation

b-ma
Copy link
Collaborator

@b-ma b-ma commented Sep 6, 2024

No description provided.

@b-ma b-ma changed the title Fix/133 Fix #133 Sep 6, 2024
Copy link
Collaborator

@orottier orottier left a comment

Choose a reason for hiding this comment

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

Looks good!


const event = new jsExport.OfflineAudioCompletionEvent(rawEvent.type, {
renderedBuffer: this.#renderedBuffer,
});

propagateEvent(this, event);
// delay event propagation to next tick that it is executed after startRendering fulfills
setTimeout(() => {
Copy link
Collaborator

Choose a reason for hiding this comment

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

I think setTimeout(.., 0) can be expressed more efficiently with setImmediate

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Yup thanks, sure I have been misleaded by mdn which marks it deprecated but it doesn't stand in node context

@@ -1,4 +1,6 @@
#![deny(clippy::all)]
// @todo - properly fix this clippy issue
#![allow(clippy::zero_repeat_side_effects)]
Copy link
Collaborator

Choose a reason for hiding this comment

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

meh, I think this is a napi issue causing false positive in clippy

Copy link
Collaborator Author

@b-ma b-ma Sep 9, 2024

Choose a reason for hiding this comment

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

Yup I agree, let's see if the problem disappear in a future napi-rs release, I opened an issue to not forget that
cf. #137

@b-ma b-ma merged commit 05f2f78 into main Sep 9, 2024
5 checks passed
@b-ma b-ma deleted the fix/133 branch September 9, 2024 07:14
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.

2 participants