Try to modify the graph. If the given closure returns an error (or if a cycle is detected), then any changes made to the graph inside the closure will be reverted. Any custom error type can be used, though [`ModifyGraphError`](crate::error::ModifyGraphError) is provided for convenience.
(
&mut self,
f: impl FnOnce(&mut Self) -> Result<(), E>,
)
| 400 | res |
| 401 | } |
| 402 | |
| 403 | /// Get an immutable reference to the processor store. |
| 404 | /// |
| 405 | /// If an audio stream is currently running, this will return `None`. |
| 406 | pub fn proc_store(&self) -> Option<&ProcStore> { |
| 407 | if let Some(proc_channel) = &self.pending_processor_channel { |
| 408 | Some(&proc_channel.store) |
| 409 | } else if let Some(processor) = self.processor_drop_rx.as_ref() { |
| 410 | if let Some(processor) = processor.last() { |
| 411 | if processor.poisoned { |
| 412 | panic!("The audio thread has panicked!"); |
| 413 | } |
| 414 | |
| 415 | Some(&processor.extra.store) |
| 416 | } else { |
nothing calls this directly
no test coverage detected