scaletempo: glitchy audio when playing backwards
scaletempo is working well for me when playing forwards, but not when playing backwards.
The first issue is that the sound has lots of artifacts, almost as though the buffers are being played in reverse, but each individual buffer is not being reversed. I had a quick look at the source and this doesn't look like the problem, but maybe it's because there is no 2-byte-sample code path in reverse_buffer? scaletempo claims to take F32LE, F64LE, and S6LE as both sink and src.
The second issue is that sometimes when changing from speed 1.0 to speed -1.0, the audio simply cuts out. I can't replicate this with other speed changes (e.g. 1.0 to -1.1 works reliably).
Here is a short rust program that demonstrates both issues: https://gist.github.com/jneem/b95f20fbbea4708a166abce7d8b174ad
To run the example:
- install a rust toolchain if you don't have one
- make a directory (say gst-test) and put the Cargo.toml file there
- make a subdirectory called "src" and put the main.rs file there
- run "cargo run", and then use the left/right arrow keys to change speed