miniaudio-rs
miniaudio-rs copied to clipboard
Cannot get Vorbis decoding to work
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
If I initialize explicitly via ma_decoder_init_file_vorbis, "failed to initialize decoder from file: no backend" is raised.
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.
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?
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.