On Wed May 8 16:15:09 2024 +0000, Davide Beatrici wrote:
The removed code always forced the default device period, regardless of what the application requested:
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:
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:
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.
Ah right. Could you extend the commit message to note that exclusive mode isn't supported with the pulse driver?