(&mut self)
| 286 | } |
| 287 | |
| 288 | pub fn update(&mut self) { |
| 289 | // Update the firewheel context. |
| 290 | // This must be called regularly (i.e. once every frame). |
| 291 | if let Err(e) = self.cx.update() { |
| 292 | tracing::error!("{:?}", &e); |
| 293 | } |
| 294 | |
| 295 | // Log any stream errors/warnings that have occurred. |
| 296 | self.stream.log_status(); |
| 297 | |
| 298 | // The stream has stopped unexpectedly (i.e the user has |
| 299 | // unplugged their headphones.) |
| 300 | // |
| 301 | // Typically you should start a new stream as soon as |
| 302 | // possible to resume processing (even if it's a dummy |
| 303 | // output device). |
| 304 | // |
| 305 | // In this example we just quit the application. |
| 306 | if !self.stream.all_streams_ok() { |
| 307 | panic!("Stream stopped unexpectedly!"); |
| 308 | } |
| 309 | } |
| 310 | |
| 311 | pub fn reset(&mut self) { |
| 312 | let nodes: Vec<NodeID> = self.cx.nodes().map(|n| n.id).collect(); |
nothing calls this directly
no test coverage detected