File tree Expand file tree Collapse file tree 1 file changed +10
-7
lines changed Expand file tree Collapse file tree 1 file changed +10
-7
lines changed Original file line number Diff line number Diff line change @@ -203,15 +203,18 @@ impl AudioProcessor for ConstantSourceRenderer {
203
203
}
204
204
205
205
fn onmessage ( & mut self , msg : Box < dyn std:: any:: Any + Send + ' static > ) {
206
- if let Ok ( schedule) = msg. downcast :: < Schedule > ( ) {
207
- match * schedule {
208
- Schedule :: Start ( v) => self . start_time = v,
209
- Schedule :: Stop ( v) => self . stop_time = v,
206
+ let msg = match msg. downcast :: < Schedule > ( ) {
207
+ Ok ( schedule) => {
208
+ match * schedule {
209
+ Schedule :: Start ( v) => self . start_time = v,
210
+ Schedule :: Stop ( v) => self . stop_time = v,
211
+ }
212
+ return ;
210
213
}
211
- return ;
212
- }
214
+ Err ( msg ) => msg ,
215
+ } ;
213
216
214
- log:: warn!( "ConstantSourceRenderer: Ignoring incoming message" ) ;
217
+ log:: warn!( "ConstantSourceRenderer: Dropping incoming message {msg:?} " ) ;
215
218
}
216
219
}
217
220
You can’t perform that action at this time.
0 commit comments