mirror of
https://github.com/RustAudio/rodio
synced 2024-12-05 01:39:15 +00:00
Rustfmt
This commit is contained in:
parent
9c0706afbf
commit
947c4b7f3e
2 changed files with 7 additions and 7 deletions
|
@ -1,7 +1,7 @@
|
|||
use std::time::Duration;
|
||||
|
||||
use crate::{Sample, Source};
|
||||
use super::SeekError;
|
||||
use crate::{Sample, Source};
|
||||
|
||||
/// Internal function that builds a `LinearRamp` object.
|
||||
pub fn linear_gain_ramp<I>(
|
||||
|
@ -9,7 +9,7 @@ pub fn linear_gain_ramp<I>(
|
|||
duration: Duration,
|
||||
start_gain: f32,
|
||||
end_gain: f32,
|
||||
clamp_end: bool
|
||||
clamp_end: bool,
|
||||
) -> LinearGainRamp<I>
|
||||
where
|
||||
I: Source,
|
||||
|
@ -24,7 +24,7 @@ where
|
|||
total_ns: duration_nanos as f32,
|
||||
start_gain,
|
||||
end_gain,
|
||||
clamp_end
|
||||
clamp_end,
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -72,7 +72,7 @@ where
|
|||
|
||||
#[inline]
|
||||
fn next(&mut self) -> Option<I::Item> {
|
||||
let factor: f32;
|
||||
let factor: f32;
|
||||
|
||||
if self.remaining_ns <= 0.0 {
|
||||
if self.clamp_end {
|
||||
|
@ -112,7 +112,7 @@ impl<I> Source for LinearGainRamp<I>
|
|||
where
|
||||
I: Source,
|
||||
I::Item: Sample,
|
||||
{
|
||||
{
|
||||
#[inline]
|
||||
fn current_frame_len(&self) -> Option<usize> {
|
||||
self.input.current_frame_len()
|
||||
|
|
|
@ -254,7 +254,7 @@ where
|
|||
/// Applies a linear gain ramp to the sound.
|
||||
///
|
||||
/// If `clamp_end` is `true`, all samples subsequent to the end of the ramp
|
||||
/// will be scaled by the `end_value`. If `clamp_end` is `false`, all
|
||||
/// will be scaled by the `end_value`. If `clamp_end` is `false`, all
|
||||
/// subsequent samples will not have any scaling applied.
|
||||
#[inline]
|
||||
fn linear_gain_ramp(
|
||||
|
@ -262,7 +262,7 @@ where
|
|||
duration: Duration,
|
||||
start_value: f32,
|
||||
end_value: f32,
|
||||
clamp_end: bool
|
||||
clamp_end: bool,
|
||||
) -> LinearGainRamp<Self>
|
||||
where
|
||||
Self: Sized,
|
||||
|
|
Loading…
Reference in a new issue