Implementing the Display trait on a type, and calling self.to_string()
in its implementation results in infinite recursion.
The default implementation of ToString for sized types that implement
Display relies on the Display trait in its implementation.
Consequently, calling `self.to_string()` in the implementation of
Display leads to infinite recursion.
This failure has been directly observed on the DecoderError type, and
the fix here is to move the logic for rendering the error as text out of
`Error::description()` and into `impl Display`. As it stands, the
`Error` trait provides a default implementation for `description()`
based on the `Display` trait if provided, so this is a simple, clean
change.
The failure is presumed to exist for Mp4Type, as it follows a similar
pattern of invoking `self.to_string()` in the `Display` implementation.
The solution there is basically to reverse the logic for `from_str()`.
* add symphonia decoder
* add symphonia-flac
* better compile errors
* remove unsafe send
* update ci
* sudo
* disable duration check because symphonia does not support it
* add error handling
* cleanup
* update symphonia and fix breaking changes
* update to published symphonia version
* update docs
* reduce namespace duplication
* remove extra reference to current frame
* pr comments
* exclude decoders from module if unused
* fix flac test
* recommend disabling default features with symphonia
If a user wants some finer access to devices and hosts this will allow
that without having to add a separate dependency to cpal and risk having
a cersion conflict between the cpal dependency and the version of cpal
within rodio.
* Improve documentation about getting default output stream to a device
* Use intra-doc links. Provide examples that can compile and run.
* Restore no_run
* More no_run
* Remove unnecessary 'static bound and cleanup
The decoder had an unnecessary 'static bound. Additionally I noticed
that there's a lot of (clippy) warnings, so I cleaned up the code a bit
as well. There's a few warnings left, but a few of those require
breaking changes.
* Address Review Comments
Previously depended on Vec internals that changes in Rust 1.45. (Closes#303)
The frame's width is always the number of channels, so instead of carrying this
information implicitely (in the vec's capacity) we make it an explicit member.