mirror of
https://github.com/RustAudio/rodio
synced 2024-11-10 06:04:16 +00:00
Optimistic update to controls.position in try_seek:
- Add entry in CHANGELOG.md - `cargo fmt`
This commit is contained in:
parent
2c95f1a00e
commit
7fc5bd05d1
2 changed files with 5 additions and 1 deletions
|
@ -16,6 +16,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
||||||
`fade_in` has been refactored to use the `linear_gain_ramp`
|
`fade_in` has been refactored to use the `linear_gain_ramp`
|
||||||
implementation.
|
implementation.
|
||||||
|
|
||||||
|
### Fixed
|
||||||
|
- `Sink.try_seek` now updates `controls.position` before returning. Calls to `Sink.get_pos`
|
||||||
|
done immediately after a seek will now return the correct value.
|
||||||
|
|
||||||
### Changed
|
### Changed
|
||||||
- `SamplesBuffer` is now `Clone`
|
- `SamplesBuffer` is now `Clone`
|
||||||
|
|
||||||
|
|
|
@ -241,7 +241,7 @@ impl Sink {
|
||||||
Ok(seek_res) => {
|
Ok(seek_res) => {
|
||||||
*self.controls.position.lock().unwrap() = pos;
|
*self.controls.position.lock().unwrap() = pos;
|
||||||
seek_res
|
seek_res
|
||||||
},
|
}
|
||||||
// The feedback channel closed. Probably another seekorder was set
|
// The feedback channel closed. Probably another seekorder was set
|
||||||
// invalidating this one and closing the feedback channel
|
// invalidating this one and closing the feedback channel
|
||||||
// ... or the audio thread panicked.
|
// ... or the audio thread panicked.
|
||||||
|
|
Loading…
Reference in a new issue