(&mut self)
| 71 | } |
| 72 | |
| 73 | pub fn update(&mut self) { |
| 74 | // Update the firewheel context. |
| 75 | // This must be called regularly (i.e. once every frame). |
| 76 | if let Err(e) = self.cx.update() { |
| 77 | tracing::error!("{:?}", &e); |
| 78 | } |
| 79 | |
| 80 | self.cx.is_active(); |
| 81 | |
| 82 | // Log any stream errors/warnings that have occurred. |
| 83 | self.stream.log_status(); |
| 84 | |
| 85 | // The stream has stopped unexpectedly (i.e the user has |
| 86 | // unplugged their headphones.) |
| 87 | // |
| 88 | // Typically you should start a new stream as soon as |
| 89 | // possible to resume processing (even if it's a dummy |
| 90 | // output device). |
| 91 | // |
| 92 | // In this example we just quit the application. |
| 93 | if !self.stream.all_streams_ok() { |
| 94 | panic!("Stream stopped unexpectedly!"); |
| 95 | } |
| 96 | } |
| 97 | } |
no test coverage detected