-
-
Notifications
You must be signed in to change notification settings - Fork 468
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
refactor: python implementation of audioop.mul
#2176
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.
LGTM
A python equivalent will not be nearly as close as the C one in terms of performance. Live audio is a heavy load and has to be low latency. |
I mean we can always rewrite it in Rust. |
and also this largely uses python stdlib modules which from the seems of things are written in C in many places. |
The whole voice stuff could be rewritten to Rust 😬 |
Possible to do actual performance tests? |
only if :) |
Hmm that sure is a difference. Use |
Can we maintain and ship our own audioop C file? Dpy plans to do something like that Or we could try Cython or maybe Rust? |
Signed-off-by: Lala Sabathil <[email protected]>
Signed-off-by: Lala Sabathil <[email protected]>
bump |
Btw, that requested change is already resolved, not sure why it doesn't automatically detect it. |
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.
Where does this come from
Co-authored-by: Lala Sabathil <[email protected]> Signed-off-by: David Hozic <[email protected]>
The changelog thing? It was probably added through some weird auto-merge. |
…2176) * Replace audioop * style(pre-commit): auto fixes from pre-commit.com hooks * versionchanged * changelog * style(pre-commit): auto fixes from pre-commit.com hooks * speed * style(pre-commit): auto fixes from pre-commit.com hooks * changelog * Optimization (1 ms) * Update discord/player.py Co-authored-by: Dorukyum <[email protected]> Signed-off-by: David Hozic <[email protected]> * Update CHANGELOG.md Co-authored-by: Lala Sabathil <[email protected]> Signed-off-by: David Hozic <[email protected]> --------- Signed-off-by: David Hozic <[email protected]> Signed-off-by: Lala Sabathil <[email protected]> Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> Co-authored-by: Dorukyum <[email protected]> Co-authored-by: Lala Sabathil <[email protected]> Co-authored-by: plun1331 <[email protected]> Co-authored-by: Lala Sabathil <[email protected]>
…2176) * Replace audioop * style(pre-commit): auto fixes from pre-commit.com hooks * versionchanged * changelog * style(pre-commit): auto fixes from pre-commit.com hooks * speed * style(pre-commit): auto fixes from pre-commit.com hooks * changelog * Optimization (1 ms) * Update discord/player.py Co-authored-by: Dorukyum <[email protected]> Signed-off-by: David Hozic <[email protected]> * Update CHANGELOG.md Co-authored-by: Lala Sabathil <[email protected]> Signed-off-by: David Hozic <[email protected]> --------- Signed-off-by: David Hozic <[email protected]> Signed-off-by: Lala Sabathil <[email protected]> Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> Co-authored-by: Dorukyum <[email protected]> Co-authored-by: Lala Sabathil <[email protected]> Co-authored-by: plun1331 <[email protected]> Co-authored-by: Lala Sabathil <[email protected]>
Summary
This PR replaces the
PCMVolumeTransformer.read()
method with a Python equivalent, that does not use theaudioop
module, which is deprecated since Python 3.11 and will be removed in Python 3.13.This implements #2177.
Information
examples, ...).
Checklist
type: ignore
comments were used, a comment is also left explaining why.