(&mut self)
| 88 | } |
| 89 | |
| 90 | pub fn update(&mut self) { |
| 91 | // Update the firewheel context. |
| 92 | // This must be called regularly (i.e. once every frame). |
| 93 | if let Err(e) = self.cx.update() { |
| 94 | tracing::error!("{:?}", &e); |
| 95 | } |
| 96 | |
| 97 | // Log any stream errors/warnings that have occurred. |
| 98 | self.stream.log_status(); |
| 99 | |
| 100 | // The stream has stopped unexpectedly (i.e the user has |
| 101 | // unplugged their headphones.) |
| 102 | // |
| 103 | // Typically you should start a new stream as soon as |
| 104 | // possible to resume processing (even if it's a dummy |
| 105 | // output device). |
| 106 | // |
| 107 | // In this example we just quit the application. |
| 108 | if !self.stream.all_streams_ok() { |
| 109 | panic!("Stream stopped unexpectedly!"); |
| 110 | } |
| 111 | } |
| 112 | } |
nothing calls this directly
no test coverage detected