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

Method update

examples/visualizer/src/system.rs:116–137  ·  view source on GitHub ↗
(&mut self)

Source from the content-addressed store, hash-verified

114 }
115
116 pub fn update(&mut self) {
117 // Update the firewheel context.
118 // This must be called regularly (i.e. once every frame).
119 if let Err(e) = self.cx.update() {
120 tracing::error!("{:?}", &e);
121 }
122
123 // Log any stream errors/warnings that have occurred.
124 self.stream.log_status();
125
126 // The stream has stopped unexpectedly (i.e the user has
127 // unplugged their headphones.)
128 //
129 // Typically you should start a new stream as soon as
130 // possible to resume processing (even if it's a dummy
131 // output device).
132 //
133 // In this example we just quit the application.
134 if !self.stream.all_streams_ok() {
135 panic!("Stream stopped unexpectedly!");
136 }
137 }
138
139 pub fn is_activated(&self) -> bool {
140 self.cx.is_active()

Callers 4

mainFunction · 0.45
mainFunction · 0.45
mainFunction · 0.45
mainFunction · 0.45

Calls 2

all_streams_okMethod · 0.80
log_statusMethod · 0.45

Tested by

no test coverage detected