On Wed May 8 08:10:01 2024 +0000, Huw Davies wrote:
This looks to me to change the behaviour significantly under winepulse, so it needs more explanation.
The removed code always forced the default device period, regardless of what the application requested:
```c static HRESULT get_device_period_helper(EDataFlow flow, const char *pulse_name, REFERENCE_TIME *def, REFERENCE_TIME *min) { struct list *list = (flow == eRender) ? &g_phys_speakers : &g_phys_sources; PhysDevice *dev;
if (!def && !min) { return E_POINTER; }
LIST_FOR_EACH_ENTRY(dev, list, PhysDevice, entry) { if (strcmp(pulse_name, dev->pulse_name)) continue;
if (def) *def = dev->def_period; if (min) *min = dev->min_period; return S_OK; }
return E_FAIL; } ```
The new function `adjust_timing()` does the same thing:
```c if (mode == AUDCLNT_SHAREMODE_SHARED) { *period = def_period; if (*duration < 3 * *period) *duration = 3 * *period; ```
We don't care about the `else` branch as exclusive mode is explicitly forbidden with PulseAudio:
```c if (params->share == AUDCLNT_SHAREMODE_EXCLUSIVE) { params->result = AUDCLNT_E_EXCLUSIVE_MODE_NOT_ALLOWED; return STATUS_SUCCESS; } ```
In conclusion: with my commit(s) applied all drivers should behave the same as before.