Merged
Conversation
Owner
OpenSauce
commented
Jun 1, 2025

Contributor
There was a problem hiding this comment.
Pull Request Overview
This PR connects the GUI layer to the audio processor by wiring up ProcessorManager into the application start-up and update flow.
- Implements
DebugforProcessorManagerto expose key internal state - Changes
startto accept aProcessorManagerinstance and removes the old “Start” message - Adds a flag-driven update that calls
ProcessorManager::set_amp_chainafter any stage change
Reviewed Changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| src/io/manager.rs | Added a Debug impl for ProcessorManager showing sample_rate and recorder presence |
| src/gui/amp.rs | Changed start signature to take ProcessorManager, removed Start button and message, added should_update_chain logic and update_processor_chain method |
Comments suppressed due to low confidence (4)
src/io/manager.rs:96
- [nitpick] The
Debugfield is namedrecorderbut prints a boolean. Consider renaming the field tohas_recorderor include the actual recorder state for clarity.
.field("recorder", &self.recorder.is_some())
src/gui/amp.rs:402
- [nitpick] Remove the commented-out
Startbutton code to clean up dead code.
- button("Start").on_press(Message::Start),
src/gui/amp.rs:365
- Add tests to verify that
update_processor_chaincorrectly invokesset_amp_chainonProcessorManager, ensuring UI updates propagate to the processor layer.
fn update_processor_chain(&self) {
src/gui/amp.rs:18
- Changing the
startfunction signature to require aProcessorManageris a breaking API change; update any external callers and documentation accordingly.
pub fn start(processor_manager: ProcessorManager) -> iced::Result {
| }; | ||
| self.stages.push(new_stage); | ||
| Task::none() | ||
| should_update_chain = true; |
There was a problem hiding this comment.
[nitpick] Consider consolidating the repeated should_update_chain = true; assignments in each message arm—perhaps by returning an indication from each variant or using a helper method—to reduce duplication and improve readability.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.