Skip to content

Comments

Connect UI and Processor#12

Merged
OpenSauce merged 1 commit intomainfrom
connect-ui
Jun 1, 2025
Merged

Connect UI and Processor#12
OpenSauce merged 1 commit intomainfrom
connect-ui

Conversation

@OpenSauce
Copy link
Owner

image

Copilot AI review requested due to automatic review settings June 1, 2025 11:24
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 Debug for ProcessorManager to expose key internal state
  • Changes start to accept a ProcessorManager instance and removes the old “Start” message
  • Adds a flag-driven update that calls ProcessorManager::set_amp_chain after 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 Debug field is named recorder but prints a boolean. Consider renaming the field to has_recorder or include the actual recorder state for clarity.
.field("recorder", &self.recorder.is_some())

src/gui/amp.rs:402

  • [nitpick] Remove the commented-out Start button code to clean up dead code.
-            button("Start").on_press(Message::Start),

src/gui/amp.rs:365

  • Add tests to verify that update_processor_chain correctly invokes set_amp_chain on ProcessorManager, ensuring UI updates propagate to the processor layer.
fn update_processor_chain(&self) {

src/gui/amp.rs:18

  • Changing the start function signature to require a ProcessorManager is 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;
Copy link

Copilot AI Jun 1, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[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.

Copilot uses AI. Check for mistakes.
@OpenSauce OpenSauce merged commit 1f3de5e into main Jun 1, 2025
2 checks passed
@OpenSauce OpenSauce deleted the connect-ui branch June 1, 2025 11:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant