Attempt to fix SAPI4
Link to issue number:
#18259
Summary of the issue:
Digalo 2000 voices (SAPI4) do not work and cause memory access violation errors.
Description of user facing changes:
Description of developer facing changes:
Description of development approach:
Work in progress
Testing strategy:
Known issues with pull request:
Code Review Checklist:
- [ ] Documentation:
- Change log entry
- User Documentation
- Developer / Technical Documentation
- Context sensitive help for GUI changes
- [ ] Testing:
- Unit tests
- System (end to end) tests
- Manual testing
- [ ] UX of all users considered:
- Speech
- Braille
- Low Vision
- Different web browsers
- Localization in other languages / culture than English
- [ ] API is compatible with existing add-ons.
- [ ] Security precautions taken.
@coderabbitai summary
@gexgd0419 Please keep in mind that whatever you fix with those voices can potentially break others. Sapi4 has turned out to be kind of a minefield.
This is yet another issue I could not reproduce (in a Windows 10 virtual machine). But as the user could reproduce with a fresh copy, and 2024.4 did not have this issue, I am trying to gradually revert to the previous implementation to see what went wrong.
I'm starting to think that maybe it's better to isolate the SAPI4 voices in a separate process where WinMM APIs are hooked, and send the audio data back via IPC channel. Although hooking every WinMM API may not be easy, this can keep the old SAPI4-related code intact and (maybe) reduce compatibility-related problems.
As NVDA will be migrated to 64-bit, an IPC approach will eventually be used. Is there any plan or direction about what kind of IPC approach will be used in 64-bit version of NVDA?
Can you confirm if this affects #17964
Given the potentially positive impact of this change, why was this moved from beta to master again?
@LeonarddeR - it is a risky change (see merge early label). We want this thoroughly tested so it doesn't delay the 2025.2 release. The current state of WASAPI 4 is quite stable compared to SAPI 5, with only 2 known synthesizer issues. We don't want to risk breaking other synthesizers this late in a beta cycle.