I’m having trouble understanding the documentation for the IAudioClient initialization function.
https://learn.microsoft.com/en-us/windows/win32/api/audioclient/nf-audioclient-iaudioclient-initialize
It’s about the difference return values;
E_INVALIDARG
and
AUDCLNT_E_UNSUPPORTED_FORMAT
The E_INVALIDARG description says “Parameter pFormat points to an invalid format description“.
However, in the description AUDCLNT_E_UNSUPPORTED_FORMAT “The audio engine (shared mode) or audio endpoint device (exclusive mode) does not support the specified format.”
What does it mean in E_INVALIDARG that the description format is “invalid”? I guess it’s not that it doesn’t fit the device, since it’s already handled by AUDCLNT_E_UNSUPPORTED_FORMAT?
And it’s also not that it is pFormat == NULL
, since it’s already handled by E_POINTER
So what specific cases does this pFormat incorrectness is covered when return == E_INVALIDARG
?