nvda icon indicating copy to clipboard operation
nvda copied to clipboard

Attempt to fix SAPI4

Open gexgd0419 opened this issue 6 months ago • 3 comments

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 avatar Jun 16 '25 14:06 gexgd0419

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

LeonarddeR avatar Jun 16 '25 16:06 LeonarddeR

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.

gexgd0419 avatar Jun 17 '25 01:06 gexgd0419

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?

gexgd0419 avatar Jun 17 '25 02:06 gexgd0419

Can you confirm if this affects #17964

seanbudd avatar Jul 01 '25 00:07 seanbudd

Given the potentially positive impact of this change, why was this moved from beta to master again?

LeonarddeR avatar Jul 10 '25 05:07 LeonarddeR

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

seanbudd avatar Jul 10 '25 05:07 seanbudd