ignore NaNs when setting the volume of each ear. min will return its value if self is a NaN. Also adds a check with debug_assert to help with debugging.
The types `Frame` and `FrameData` are mutually recursive, and the
incidental linked lists that can be formed as a result can be long (at
least in the order of thousands of elements). As a result, when a frame
is deallocated, rust appears to recursively call `drop_in_place` down
the list, causing stack overflows for long lists.
* Skip no more than 3 consecutive decode errors
* missing delimiter
* Corrections after build
* use const
* reorganize second loop
Co-authored-by: Rrogntudju <rrogntudju@example.com>
I think this makes the next() function easier to understand. We can
write this more efficiently by reusing a Vec on the struct rather than
allocating each time and a mem::swap to avoid shifting elements in a Vec.
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