ExPixel / miniaudio-rs

Rust bindings for miniaudio C library.
https://crates.io/crates/miniaudio
MIT License
49 stars 20 forks source link

headers inside extras are not found when we use this crate as dependencie #10

Closed Nazariglez closed 4 years ago

Nazariglez commented 4 years ago

Hey!

I'm trying to use your bindings from crates.io using the mp3 feature enabled but the build fails because the headers inside extras are not included:

cargo:warning=./miniaudio-wrapper.c:6:10: fatal error: './miniaudio/extras/dr_mp3.h' file not found
cargo:warning=#include "./miniaudio/extras/dr_mp3.h"
cargo:warning=         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
cargo:warning=1 error generated.

Not sure if this is an issue with crates.io, or how to include the headers. Do you know how can we fix this? I can help you if you can give me some hint.

Thanks for your work, it's really useful for me.

ExPixel commented 4 years ago

Ah, I never got around to including and Dr libraries from extras and creating safe APIs for them since they weren't really needed for my emulator. I'll probably do that at some point but for now you would have to use another library to get samples out of an MP3.

Nazariglez commented 4 years ago

Oh, that's sad. I would like to use it on a cross-platform game engine but I understand that you have another goal, if you need any help with this just tell me.

Thanks

ExPixel commented 4 years ago

Thanks again for the PR. I've included your code (as well as your example with some modifications) into version 0.7.0 and published it to crates.io

ExPixel commented 4 years ago

Actually I've just noticed we're missing two important functions for the decoder. I've put those under a new issue though in #18

Nazariglez commented 4 years ago

Thank you so much, I'll take about the missing functions.