|
12 | 12 | //! +---> Mixer +-+
|
13 | 13 | //! +------> +--------+
|
14 | 14 | //! | +-------+ |
|
15 |
| -//! +--------+ +---v---+ |
16 |
| -//! | Damper <--------------+ Delay | |
17 |
| -//! +--------+ +-------+ |
| 15 | +//! +--------+ +---v----+ |
| 16 | +//! | Delay <--------------+ Damper | |
| 17 | +//! +--------+ +--------+ |
18 | 18 |
|
19 | 19 | use actor::{Actor, Addr, Context, Recipient, System};
|
20 | 20 | use anyhow::Error;
|
@@ -270,15 +270,15 @@ fn main() -> Result<(), Error> {
|
270 | 270 | // Create Mixer address explicitly in order to break the circular dependency loop.
|
271 | 271 | let mixer_addr = Addr::default();
|
272 | 272 |
|
273 |
| - // Damper feeds back into Mixer. |
274 |
| - let damper_addr = system.spawn(Damper { next: mixer_addr.recipient() })?; |
| 273 | + // Delay feeds back into Mixer. |
| 274 | + let delay_addr = system.spawn(Delay::new(mixer_addr.recipient()))?; |
275 | 275 |
|
276 |
| - // Delay effect goes into Damper. |
277 |
| - let delay_addr = system.spawn(Delay::new(damper_addr.recipient()))?; |
| 276 | + // Damper goes into Delay effect. |
| 277 | + let damper_addr = system.spawn(Damper { next: delay_addr.recipient() })?; |
278 | 278 |
|
279 | 279 | // We can finally spawn the Mixer. Feeds into Output and Delay effect.
|
280 | 280 | system.spawn_fn_with_addr(
|
281 |
| - move || Mixer::new(output_addr.recipient(), delay_addr.recipient()), |
| 281 | + move || Mixer::new(output_addr.recipient(), damper_addr.recipient()), |
282 | 282 | mixer_addr.clone(),
|
283 | 283 | )?;
|
284 | 284 |
|
|
0 commit comments