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

Method update

examples/spatial_basic/src/system.rs:90–111  ·  view source on GitHub ↗
(&mut self)

Source from the content-addressed store, hash-verified

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}

Callers

nothing calls this directly

Calls 2

all_streams_okMethod · 0.80
log_statusMethod · 0.45

Tested by

no test coverage detected