MCPcopy Create free account
hub / github.com/BillyDM/Firewheel / update

Method update

examples/visual_node_graph/src/system.rs:288–309  ·  view source on GitHub ↗
(&mut self)

Source from the content-addressed store, hash-verified

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();

Callers

nothing calls this directly

Calls 2

all_streams_okMethod · 0.80
log_statusMethod · 0.45

Tested by

no test coverage detected