Skip to content

Validate standalone audio device pairs before opening streams - #19

Merged
sdatkinson merged 1 commit into
neuralampmodeler-mainfrom
655-validate-audio-device-pair
Aug 10, 2026
Merged

sdatkinson merged 1 commit into
neuralampmodeler-mainfrom
655-validate-audio-device-pair

Conversation

@sdatkinson

Copy link
Copy Markdown
Owner

Summary

  • resolve saved device names only against devices that support the requested input or output route and channel count
  • require one valid duplex device for ASIO while allowing independent validated input/output devices for DirectSound and CoreAudio
  • reset cached default device IDs whenever the audio API is reprobed
  • persist fallback devices only after the replacement stream opens successfully
  • reject unprobed or under-capacity devices before channel offsets are calculated

Root cause

The standalone host resolved saved names against every enumerated device without checking whether the device was probed, supported the requested direction, or exposed enough channels. A wrong-direction match could therefore reach stream setup with zero available channels, where subtracting one from the clamped channel index underflowed. Default device IDs could also remain stale after changing audio APIs.

User impact

DirectSound remains the Windows default. Invalid or stale driver/device combinations now fall back to a compatible pair, and the app remains available for configuration when no compatible pair exists instead of attempting to open an invalid stream.

Verification

  • built Examples/IPlugEffect/IPlugEffect.sln target IPlugEffect-app in Release x64 with the Visual Studio 2022 toolset
  • git diff --check

The hardware-specific failure from sdatkinson/NeuralAmpModelerPlugin#655 could not be reproduced locally without an affected audio-device configuration.

Supersedes #18.

@sdatkinson
sdatkinson marked this pull request as ready for review August 10, 2026 00:57
@sdatkinson
sdatkinson merged commit de5a4fb into neuralampmodeler-main Aug 10, 2026
@sdatkinson
sdatkinson deleted the 655-validate-audio-device-pair branch August 10, 2026 00:58
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