For example, if a stereo source starts playing on an odd-numbered call
to DynamicMixer::next() then the output stream will play its first
sample in the right channel, its second in the left, etc. This is wrong.
The first sample should be played in the left channel.
If the source we are skipping runs out of data, it will return Some(0)
as the frame length. Before, this would cause an infinite loop because
we would skip zero samples forever. This commit fixes it by checking
explicitly if the frame length is zero and bailing out if it is.
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