mirror of
https://github.com/librespot-org/librespot.git
synced 2025-02-06 17:47:10 +00:00
8d35b4b860
It would be so much easier to use elapsed but elapsed could potentially panic is rare cases. See: https://doc.rust-lang.org/std/time/struct.Instant.html#monotonicity Otherwise this is pretty straight forward. If anything fails getting expected_position_ms it will return 0 which will trigger a notify if either stream_position_ms or decoder_position_ms is > 1000. If all goes well it's simply a matter of calculating the max delta of expected_position_ms and stream_position_ms and expected_position_ms and decoder_position_ms. So if the decoder or the sample pipeline are off by more than 1 sec we notify. |
||
---|---|---|
.. | ||
src | ||
Cargo.toml |