[][src]Struct twang::Room

pub struct Room { /* fields omitted */ }

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 signal
  • samples: the number of samples it takes for the reflection to occur
  • attenuation: 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

impl Debug for Room[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.