Skip to content

Comments

Fix intermittent crashes in speech/audio pipeline#2

Open
kirill-jjj wants to merge 4 commits intocyrmax:masterfrom
kirill-jjj:master
Open

Fix intermittent crashes in speech/audio pipeline#2
kirill-jjj wants to merge 4 commits intocyrmax:masterfrom
kirill-jjj:master

Conversation

@kirill-jjj
Copy link

Summary

  • harden audio playback path and remove UB in resampler frame handling
  • validate SRAL output and propagate playback failure from Speech::speak
  • guard voice/device UI selection indexes and fallback to device index 0

Details

  • initialize audio device state safely and avoid comparing uninitialized ma_device_id
  • validate channels/sample rate/bits per sample before computing frame counts
  • handle missing/invalid selected output device by falling back to index 0
  • prevent out-of-range UI selections and handle empty voice list safely

Commits

  1. fix: harden audio pipeline and device selection
  2. fix: validate SRAL output before audio playback
  3. fix: guard ui voice/device selection indices

Remove UB in resampler frame count handling, initialize device state safely, validate audio metadata, and add fallback device index 0 handling.
Handle null SRAL buffers and invalid audio metadata, and propagate playback result from Audio::playAudioData instead of always returning success.
Prevent out-of-range voice and device selections, handle empty voice list, and normalize invalid device selection to index 0.
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