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
HW/DVDInterface: Avoid heap allocation in DTK callback. #11655
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
One small comment, because I don't think there's a good reason to leave the risk of overflowing a stack buffer here.
bc2ee66
to
ed2e768
Compare
ed2e768
to
66b6a60
Compare
|
tbqh this still seems a bit shaky, this definitely breaks if |
|
I've rewritten the math to work in terms of DTK data blocks instead of sample counts, this should be safer in case we ever get a weird value somehow. Please verify. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not convinced moving to blocks made things any simpler... but whatever, either way is fine.
28532c0
to
4c21cdd
Compare
This should be equivalent, and 672 bytes is small enough that having it on the stack should be fine.