This comes from IAudioClient::GetMixFormat() returning AUDCLNT_E_DEVICE_IN_USE, probably because alsa_open_device() is getting EBUSY from snd_pcm_open(). FAudio, typically, has zero error handling, and just blithely tries to dereference the format it receives. This isn't really something I can address in the test, but I'll submit a fix to faudio.
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/9453#note_123188
Control display of progress dialog with CAP_INDICATORS.
Use PeekMessage/DispatchMessage loop while scanning. Display some informations on scan job in progress dialog.
If ADF is enabled and not filled with paper, display an error message to the user and allow a retry.
Also displays paper jammed message and cover open message.
Added german translation for the new error messages and progress dialog controls.
{width=389 height=320}
Error message display are controlled with CAP_INDICATORS if Data Source UI is not shown.
--
v2: dlls/sane.ds: Display message if ADF is empty in ADF scan
dlls/sane.ds: Added cancel button and progress bar to progress dialog
https://gitlab.winehq.org/wine/wine/-/merge_requests/9530
I see the possibility of splitting the patch into a large patch that does not contain the PickIconDlg_OnClickButton function and a small patch that adds the PickIconDlg_OnClickButton function and also the call to this function in the PickIconDlg_Proc function. Unfortunately, this does not help much, because the PickIconDlg_OnClickButton function has less than 100 lines of code.
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/9477#note_123177
This allows combining the capability negotiation with the application program with the user interface.
# Capability values ignored with User Interface
The recent patch to save sanner parameters from the twain user interface to the registry restores these parameters from the registry while displaying the dialog box.
Settings performed by the application program via the capabilities mechanism are thus overwritten from the registry and ignored.
So negotiated parameters are only honoured if the Twain user Interface is not being displayed. In that case _all_ old settings from the previous scan with UI displayed are ignored.
# Solution in this merge request
The TWAIN 2.4 specification says on Page 4-2 (PDF-Page 76):
```
At the time of loading the data source, all current values for the appropriate capabilities would be
set to values that have either been restored from a previous session, or those that are "preferred"
by the data source. This current value will remain until it has been explicitly changed by the
calling application, or that application issues a MSG_RESET.
```
This is the approach choosen for this merge request:
The new function SANE_LoadOptions loads parameter values from the registry when the data source is being opened and transfers them to the sane parameter store.
The code in InitializeDialog, that loaded data from the registry, is restored to an older version and does not handle the registry at all. Instead dialog controls are filled based on the information in the SANE parameter database.
Saving changed parameters remains as before.
--
v3: dlls/sane.ds: Load last settings from registry immediatly when opening the DS
https://gitlab.winehq.org/wine/wine/-/merge_requests/9479