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

Performance issues while the plugin is processing silence #22

Closed
sagamusix opened this issue Mar 16, 2019 · 6 comments
Closed

Performance issues while the plugin is processing silence #22

sagamusix opened this issue Mar 16, 2019 · 6 comments

Comments

@sagamusix
Copy link

sagamusix commented Mar 16, 2019

A user of my plugin host, OpenMPT has reported performance issues with this plugin. It seems like it will make sound output stutter and produce a high CPU load whenever its input is total silence. To me that sounds like denormals are generated somewhere in the audio processing path. Observed with both 32-bit and 64-bit Windows VST2 builds.

@sagamusix
Copy link
Author

Okay, I did a very quick modification to OpenMPT to instruct the CPU to flush all denormals to zero before calling the plugin's process function. It causes the plugin to behave well again, so there are definitely some denormals being processed. Some hosts may always be enforcing flushing denormals to zero so the problem does not manifest in them, but I don't think that the host should do that. If the plugin relies on flushing denormals to zero, it should do the necessary CPU state modifications, or it should avoid generating denormals altogether.

@mzuther
Copy link
Owner

mzuther commented Mar 17, 2019

Hi!

I've got very little time these days and possibly will for the coming months. That being said, I have devised a work-around (one single line, you wouldn't believe it) and committed it to a branch called "use_denormals". Feel free to test this -- if it solves the problem, I will release an updated version.

Thanks!

Martin

@sagamusix
Copy link
Author

Hi Martin, the use_denormals branch does indeed fix the issue. Thanks for the quick reply!

@mzuther
Copy link
Owner

mzuther commented Mar 17, 2019

That's great to hear! Could you please check the use_denormals branch once again? I have dropped all manual denormalization and would like to know whether that is prudent. :)

Thanks,

Martin

@sagamusix
Copy link
Author

Still seems to work as intended with the latest changes.

@mzuther
Copy link
Owner

mzuther commented Mar 23, 2019

Thanks! I have just released a new version with the use_denormals fix.

Martin

@mzuther mzuther closed this as completed Mar 23, 2019
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

No branches or pull requests

2 participants