Closed sagacity closed 3 years ago
That's what I had before actually (I hand wrote the bindings at first, and then later just generated them using bindgen locally), but it caused some issues because of the many ifdefs that change miniaudio's public API — mostly the size and alignment of structs — for each platform. What I'll probably do is set up some GitHub action to generate the bindings per platform. I'll see if I can get that done over the weekend.
That would be awesome!
I found some time and have pushed a change to master that will have pre-generated bindings created, tested, and pushed for linux-x86_64
, macos-x86_64
, and windows-x86_64
targets. Unfortunately I don't have a Windows machine to test on right now but it all seems to be working in CI at least. Now if you use miniaudio without default features bindgen shouldn't be included by default.
miniaudio = { default-features = false, features = ["ma-log-level-error"] }
for the default features without bindgen.
I can confirm master
works on Windows! I haven't done a rigorous check of all features, but basic playback and seeking of streams works so I guess this is fine.
Thanks for taking the time to fix this :heart:
It's a bit tricky to build
miniaudio-rs
on Windows because the bindings require llvm and clang. Normally this would just be a matter of installing them butllvm-config
is not part of the installer and will only be available if llvm is built from source. This seems like a fairly high barrier to entry 😄Would it be possible to include pre-generated bindings in the crate somehow (e.g. similar to how https://github.com/Gekkio/imgui-rs does this, for instance)? This would remove the need for having llvm and clang installed.