changing speed can cause track_position to become inaccurate
Speed should only apply changes at frame boundaries since track_position uses those to add up the currently played duration OR track_position should update its internal counter every sample.
- needs a test first, preferably integration.
This isn't clear .it seems interesting and I may want to go with it .But I don't understand what you mean yet.
Speed works by changing the sample-rate. The sample rate normally only changes at frame boundaries. Track position assumes it never changes except when a new frame starts (see: https://github.com/RustAudio/rodio/blob/489e184a58c3655e7806318d2a8a7248d5055e67/src/source/position.rs#L103).
We should make it so that speed only changes the sample-rate at frame boundaries and limit the latency this causes by letting speed put an upper bound on frame boundary length.