Closed bonsairobo closed 7 years ago
Here's the code I'm running:
let mut song_ogg = audrey::open("resources/audio/song.ogg").unwrap(); let frames: Vec<Stereo<i16>> = song_ogg.frames() .filter(|x| x.is_ok()) .map(Result::unwrap) .map(|x: [i16; 2]| Stereo { left: x[0], right: x[1] }) .collect();
For whatever reason, this takes more than 50 seconds to run, but song.ogg is only 3.2 MB. Am I doing something wrong?
@bonsairobo do you have a release build? The ogg/vorbis decoder is written in rust, therefore a debug build is slower.
Good call. The release build only takes a second or so. Sorry about the non-issue.
Here's the code I'm running:
For whatever reason, this takes more than 50 seconds to run, but song.ogg is only 3.2 MB. Am I doing something wrong?