mirror of
https://github.com/RustAudio/rodio
synced 2024-12-05 01:39:15 +00:00
No description
268dddae64
As I understand it, this is the issue: * Previously, when a queue has `keep_alive_if_empty` set to true, and it becomes empty, then it will push a silence lasting 10ms onto the queue. * This is an issue because `current_frame_len` would have returned the worst case, `512`, and the silence lasts less than that. * This means that unless the source is added immediately to the queue, and so a silence is never played, then the first actual source could start playing at a frame that is not aligned to its channels, or play at the wrong sample rate. * This is only determined by when the source is added to the queue after its initialization. This explains why the issue was inconsistent, as it relied on the speed of execution of code which is basically random. Solution * Change the functionality of `Zero` to add a method to create a silence with a certain number of frames. * Replace the 10ms silence with a silence the length of `THRESHOLD` * Change queue's `current_frame_len` to return `THRESHOLD` if a silence will be played next. |
||
---|---|---|
.github/workflows | ||
assets | ||
examples | ||
src | ||
tests | ||
.gitignore | ||
.rustfmt.toml | ||
Cargo.toml | ||
CHANGELOG.md | ||
LICENSE-APACHE | ||
LICENSE-MIT | ||
README.md |
Audio playback library
Rust playback library.
Playback is handled by cpal. Format decoding can be handled either by Symphonia, or by format-specific decoders:
- MP3 by minimp3 (but defaults to Symphonia).
- WAV by hound.
- Vorbis by lewton.
- FLAC by claxon.
- MP4 and AAC (both disabled by default) are handled only by Symphonia.
See the docs for more details on backends.
Documentation
The documentation contains an introduction to the library.
License
Licensed under either of
- Apache License, Version 2.0, (LICENSE-APACHE or http://www.apache.org/licenses/LICENSE-2.0), or
- MIT license (LICENSE-MIT or http://opensource.org/licenses/MIT)
at your option.
License of your contributions
Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.