Skip to content

Fix voice state machine bug in refactored helper functions#31

Merged
davidirvine merged 1 commit intodevelopfrom
fix/getting-tests-to-pass
Jul 21, 2025
Merged

Fix voice state machine bug in refactored helper functions#31
davidirvine merged 1 commit intodevelopfrom
fix/getting-tests-to-pass

Conversation

@davidirvine
Copy link
Copy Markdown
Owner

The issue was in the update_voice_state helper function which was re-reading the voice state instead of using the current state passed from the main processing loop. This caused the voice to get stuck in PENDING_TRANSIT_TO_TARGET state instead of properly transitioning through IN_TRANSIT_TO_TARGET to AT_TARGET.

Changes:

  • Modified update_voice_state to accept current_state parameter
  • Fixed enum references to use DeepnoteVoice::STATE instead of voice.STATE
  • All tests now pass (10 passed, 0 failed)

The issue was in the update_voice_state helper function which was
re-reading the voice state instead of using the current state passed
from the main processing loop. This caused the voice to get stuck in
PENDING_TRANSIT_TO_TARGET state instead of properly transitioning
through IN_TRANSIT_TO_TARGET to AT_TARGET.

Changes:
- Modified update_voice_state to accept current_state parameter
- Fixed enum references to use DeepnoteVoice::STATE instead of voice.STATE
- All tests now pass (10 passed, 0 failed)
@davidirvine davidirvine merged commit 7d15093 into develop Jul 21, 2025
@davidirvine davidirvine deleted the fix/getting-tests-to-pass branch July 25, 2025 00:17
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