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

Method update

examples/custom_nodes/src/system.rs:73–96  ·  view source on GitHub ↗
(&mut self)

Source from the content-addressed store, hash-verified

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}

Callers 1

mainFunction · 0.45

Calls 3

all_streams_okMethod · 0.80
is_activeMethod · 0.45
log_statusMethod · 0.45

Tested by

no test coverage detected