-
Notifications
You must be signed in to change notification settings - Fork 14
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
Missing libsamplerate binary for Mac M1 #9
Comments
Be aware that on M1 macs/modern versions of macOS you will face an additional issue: The way
I have changed the callback to the new style and it is working again. However, due to the messy situation of
I am not 100% sure how to proceed with any of this. |
Thanks for the fix @nils-werner I am currently using your fork, I clone and build libsamplerate then copy the dynlib to the appropriate location, it is a bit of a mess though as not only do I have to build it separately and copy things into the appropriate place, I also have to install from your fork rather than the deployed version. I would be great if we could get this fix into this package, but I also dont know how to proceed. |
Sorry for the radio silence here. I haven't had much time to dedicate to this project. I welcome contributions and would like to keep it alive. The messiest part of the project is the build of If someone wants to help with the maintenance of the project, please get in touch. |
I am using AlmaLinux 8.7 at work where I do not have root access. Here, libsamplerate is NOT installed by default. I don't know how other Python packages handle such dependencies (whether a library can be assumed to be available or not). As this is not a system library, I would suggest to add a binary libsamplerate for Linux as well. |
@tuxu I am trying to address this issue by creating pybind11 based bindings that statically link the libsamplerate library. The code is here. The advantages are as follows
@tuxu I'd be grateful if you can provide some feedback on how to proceed. Could this be a successor to your package or should I make it a different package on pypi? |
I have added now the bindings for
|
For those interested, I finally put some effort into making the bindings a 1-to-1 drop-in replacement for python-samplerate. I also went ahead, called it |
@fakufaku This looks pretty neat! The only downside about using Things would actually become much simpler if we could adopt As for the future of this project: I think best way forward is to join forces, work on merging your changes into
The context manager gives the user a bit more control over memory allocations. We can guarantee that memory is released ( with CallbackResampler(callback, ratio, converter_type) as resampler:
...
|
@tuxu Thanks for the feedback, this is very appreciated!
I didn't know about this! But waiting for 3.12 seems a bit far out there. But when it comes I don't think that switching to nanobind should be a big hurdle.
Interesting, this could be a good opportunity to learn rust... 🦀 But... 😅
Actually, after writing this, I went ahead and implemented it anyway 😄 It was still not de-allocating memory, but I have now checked how you handle the case were the object is re-used outside the context and did it in a similar way.
I also think that would be the best outcome possible! This is a pretty big leap in terms of code and design so I'm not sure how you'd like to proceed.
I can prepare a pull request and then you could review it. |
Sounds great! I have also just added you as a collaborator for this repo. |
Fixed by new version using pybind11 bindings (#10) |
If this project is still being maintained, is there a plan to include a binary for M1 (ARM64) Macs or a "universal" .dynlib?
The text was updated successfully, but these errors were encountered: