Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Link to issue number:
Closes #17512
Fix-up of #17496
Summary of the issue:
After the removal of winmm support, SAPI5 synthesisers failed to initialise.
This is because we switched from integer-based IDs as used by winmm, to ID strings as used by Windows Core Audio.
Description of user facing changes
SAPI5 synthesisers now initialise correctly.
Description of development approach
Rather than calling
outputDeviceNameToID
to index into the audio outputs returned by SAPI, iterate over them and look for one whoseDescription
matches the friendly name of the output device to use as stored in the user's config.Testing strategy:
Tested loading SAPI5 with a number of output devices selected, and changing output devices with SAPI5 loaded.
Known issues with pull request:
None.
Code Review Checklist:
@coderabbitai summary