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

perf: remove copying of audio buffer before encrypting #774

Closed
wants to merge 1 commit into from
Closed

perf: remove copying of audio buffer before encrypting #774

wants to merge 1 commit into from

Conversation

Fluiser
Copy link

@Fluiser Fluiser commented Aug 14, 2023

Removing meaningless allocation and copying memory.

Communication with the system is expensive.

@netlify
Copy link

netlify bot commented Aug 14, 2023

Deploy Preview for dpp-dev ready!

Name Link
🔨 Latest commit 1eda0c6
🔍 Latest deploy log https://app.netlify.com/sites/dpp-dev/deploys/64da5aecae366b00089c988f
😎 Deploy Preview https://deploy-preview-774--dpp-dev.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@braindigitalis
Copy link
Contributor

is this fully tested, with both send and receive of data, and mixing audio?

the data copies are not meaningless at all and are required to prevent buffers overwriting themselves inside opus and sodium - please ensure everything works correctly.

I do not think this is safe.

Copy link
Contributor

@braindigitalis braindigitalis left a comment

Choose a reason for hiding this comment

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

please ensure unit tests pass and that a sample program is written to show this. you removed the pull request template text so I have no way of knowing if this was done.

@Mishura4
Copy link
Member

According to the sodium docs, the buffers can overlap. However yes it would be good to confirm everything still works.

@Mishura4 Mishura4 changed the title Update discordvoiceclient.cpp perf: remove copying of audio buffer before encrypting Aug 14, 2023
@Mishura4
Copy link
Member

I've also renamed the PR to comply with the coding style standards.

@Fluiser Fluiser closed this Aug 14, 2023
@Fluiser Fluiser deleted the dev-1 branch August 14, 2023 20:40
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.

3 participants