Skip to content
This repository has been archived by the owner on Jan 6, 2023. It is now read-only.

Cannot get Vorbis decoding to work #53

Open
jpochyla opened this issue Dec 4, 2020 · 4 comments
Open

Cannot get Vorbis decoding to work #53

jpochyla opened this issue Dec 4, 2020 · 4 comments
Labels
bug Something isn't working

Comments

@jpochyla
Copy link
Contributor

jpochyla commented Dec 4, 2020

Hi! I've modified the simple-playback-decoder example to reach for an OGG vorbis file and always get the following output (failed to initialize decoder from file: generic). Is there anything I'm missing? It looks like stb_vorbis is getting compiled in. Thank you!

$ cargo run --example simple-playback-decoder --features=ma-enable-vorbis
   Compiling ep-miniaudio-sys v2.4.0 (/Users/jpochyla/Projects/jpochyla/miniaudio-rs/miniaudio-sys)
warning: ./miniaudio/extras/stb_vorbis.c:3055:95: warning: unused parameter 'step2_flag' [-Wunused-parameter]
warning: static int do_floor(vorb *f, Mapping *map, int i, int n, float *target, YTYPE *finalY, uint8 *step2_flag)
warning:                                                                                               ^
warning: ./miniaudio/extras/stb_vorbis.c:3162:86: warning: unused parameter 'left_end' [-Wunused-parameter]
warning: static int vorbis_decode_packet_rest(vorb *f, int *len, Mode *m, int left_start, int left_end, int right_start, int right_end, int *p_left)
warning:                                                                                      ^
warning: 2 warnings generated.
   Compiling miniaudio v0.10.0 (/Users/jpochyla/Projects/jpochyla/miniaudio-rs/miniaudio)
    Finished dev [unoptimized + debuginfo] target(s) in 19.28s
     Running `/Users/jpochyla/Projects/jpochyla/miniaudio-rs/target/debug/examples/simple-playback-decoder`
thread 'main' panicked at 'failed to initialize decoder from file: generic', miniaudio/examples/simple-playback-decoder.rs:5:10
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
@ExPixel ExPixel added the bug Something isn't working label Dec 5, 2020
@jpochyla
Copy link
Contributor Author

jpochyla commented Dec 6, 2020

If I initialize explicitly via ma_decoder_init_file_vorbis, "failed to initialize decoder from file: no backend" is raised.

@ExPixel
Copy link
Owner

ExPixel commented Dec 6, 2020

Odd, I thought I had this working at one point. Maybe I broke it without realizing. I'll try and reproduce on my end. Although I am working on refactoring the library and the bindings a bit so maybe I'll end up fixing it through that.

@jpochyla
Copy link
Contributor Author

jpochyla commented Dec 9, 2020

Ok, thanks! I've seen that miniaudio is working on a high-level API for the 1.0 version, are you planning on adding those to miniausio-rs?

@ExPixel
Copy link
Owner

ExPixel commented Dec 10, 2020

Yeah, version 1.0 is what I've been waiting for before doing too much work on the library so that I wasn't trying to support a moving target.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants