Skip to content

RSDK-13693 Remove Reconfigurable#40

Merged
oliviamiller merged 3 commits into
viam-modules:mainfrom
oliviamiller:remove-reconfigure
May 20, 2026
Merged

RSDK-13693 Remove Reconfigurable#40
oliviamiller merged 3 commits into
viam-modules:mainfrom
oliviamiller:remove-reconfigure

Conversation

@oliviamiller

@oliviamiller oliviamiller commented May 19, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • Reconfigurable was removed from viam-cpp-sdk (commit 571407760), so audio-poc must drop it before the SDK can be bumped past 0.36.0. - which we need to add the PlayStream API
  • Removes the Reconfigurable base class and reconfigure() methods from Speaker and Microphone.
  • Drops stale <viam/sdk/resource/reconfigurable.hpp> includes from discovery.{cpp,hpp} and mp3_encoder.hpp.
  • Simplifies Microphone::get_audio now that the only audio_context_ swap is via the watchdog (same format, so no need to re-run setup_stream_params or rebuild the MP3 encoder on context change).
  • Drops StreamGuard / active_streams_ (only used to warn during reconfigure).
  • Removes the four MicrophoneTest, Reconfigure* tests.
  • Removes the "Reconfiguration Behavior" section from the README — it described the seamless-transition behavior that no longer exists.

Behavior change

Previously, a config change called reconfigure() on the live component and active get_audio() / play() calls would transition under it. Now the SDK destroys the component and constructs a fresh one on any config change; in-flight RPCs are canceled and clients must reconnect.

Test plan

  • Local build green against the currently-pinned SDK (viam-cpp-sdk/0.21.0).
  • CI green.

The Reconfigurable base class was removed from viam-cpp-sdk
(commit 571407760), so we need to drop our use of it before we
can bump the SDK. With Reconfigurable gone, a config change now
tears down and reconstructs the component instance instead of
transitioning in place.

While here, simplify the now-redundant context-change handling
in Microphone::get_audio:
- Drop the `is_reconfigure` parameter on `setup_stream_params`
  (the only caller now always passes `false`).
- Drop the inner `setup_stream_params` re-run on context change.
  The watchdog restarts a stream with the same format, so chunk
  sizes and MP3 encoder state are still valid.
- Drop `StreamGuard` / `active_streams_` (only used to warn
  during reconfigure).
@oliviamiller oliviamiller changed the title Remove Reconfigurable to unblock SDK upgrade RSDK-13693 Remove Reconfigurable to unblock SDK upgrade May 19, 2026
@oliviamiller oliviamiller changed the title RSDK-13693 Remove Reconfigurable to unblock SDK upgrade RSDK-13693 Remove Reconfigurable May 19, 2026
@oliviamiller oliviamiller requested a review from seanavery May 19, 2026 20:30

@seanavery seanavery left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Looking good! Love to see the red diffs :)

Do we need to update watchdog.hpp at all to remove reconfigure refs?

Are we planning on bumping the SDK in this PR before merging?

Comment thread README.md

### Reconfiguration Behavior

The microphone component supports reconfiguration - you can change stream attributes without restarting the audio stream RPC calls. When you reconfigure:

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Should we have a short note here explaining the new "reconfigure" contract?

Any config change will terminate in-flight get_audio streams. Client needs to handle error and resubmit a get_audio request

@oliviamiller

Copy link
Copy Markdown
Collaborator Author

Looking good! Love to see the red diffs :)

Do we need to update watchdog.hpp at all to remove reconfigure refs?

Are we planning on bumping the SDK in this PR before merging?

I will bump in the next PR to add playstream implementation

@oliviamiller oliviamiller merged commit 10e2088 into viam-modules:main May 20, 2026
5 checks passed
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.

2 participants