[−][src]Struct twang::Room
Room effect. Use to add reflections to the sound. Reflections can create either echo (> 50 ms delay) or reverb (< 50 ms delay).
Implementations
impl Room
[src]
pub fn new(queue_len: usize) -> Self
[src]
Create a new Room Effect.
queue_len
: Maximum number of samples ahead to generate reverb/echo.
pub fn add(&mut self, signal: Signal, samples: usize, attenuation: f64)
[src]
Add reflection to the room.
signal
: the input signalsamples
: the number of samples it takes for the reflection to occurattenuation
: the gain to multiply by after each reflection
pub fn gen(&mut self) -> Signal
[src]
Generate the next sample of all reflections in the room.
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for Room
[src]
impl Send for Room
[src]
impl Sync for Room
[src]
impl Unpin for Room
[src]
impl UnwindSafe for Room
[src]
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,