[wdmaudiodev] Windows APO Format Negotiation IsInputSupported continues to offer rejected 96k sample rate

  • From: Culann mac Cabe <culann@xxxxxxxxxx>
  • To: wdmaudiodev@xxxxxxxxxxxxx
  • Date: Fri, 9 Nov 2018 16:35:01 +0000

Hello wdmaudiodev!

I am developing an APO Driver, specifically an "LFX" APO (I need to be
compatible with Win7).  The key points of this APO are:

   -
   - I am using WDK 10.1.17.110
   - My APO is registered with APO_FLAG_FRAMESPERSECOND_MUST_MATCH |
   APO_FLAG_BITSPERSAMPLE_MUST_MATCH
   - DSP processing of multiple channels in to produce 2 out.
   - I make calls to a DSP library which runs at 44.1k or 48k
   - The USB heaphone I am targetting runs at 96k


I am finding unusual behaviours in relation to IsInputFormatSupported()
compared to what I have read in the MS documentation.  Simply put, I have
implemented IsInputFormatSupported() as follows:

   - I return S_FALSE if the input channel count is not what I suuprt, and
   I suggest 2
   - I return S_FALSE if the input sample rate is not 44.1k or 48k, and I
   suggest 48k

According to the documentation, given that my output format is 96k, I would
expect to be presented with 96k to start with and then, after I reject that
and suggest 48k I would expect to be offered 48k, which I would accept and
then we'd all happily move to LockForProcess().

However, what I am finding (on my Win 10 PC) is that Windows repeatedly
offers me 96k and then, after I reject it, gives up, disabling my APO.

I have 2 questions:

   1. Does anyone have any tips or observations on my scenario as described
   above
   2. I override IsOutputFormatSupported() in my APO but note that it is
   never called - is this expected and, if so, can I just get rid of the
   overrride?

Thanks!
Culann

Other related posts: