WDM Audio problems


I’m currently developing a virtual audio driver using the WaveCyclic
miniport (My test box is running Vista but I don’t think that matters). I
began with the MSVAD Multi-stream sample program because I require full
duplex operation. However, after several weeks of reading the
documentation and fighting with the sample code, I still have several
fundamental problems:

  1. The microphone status is “Currently unavailable”. I noted that the
    “simple” sample program shows the same status for the mic, whereas the
    “multi” program has it ready and useable. Since I started with the “multi”
    code, my driver also previously had a usable mic, but something has
    changed and this is no longer the case. I can’t figure out what. I haven’t
    had any success discovering the technical meaning of “currently
    unavailable” either, either in the WDK documentation or on the web.

  2. I need to run at a specific sample format and rate. I have tried
    setting these parameters in the miniport filter descriptor, in the
    ResultantFormat parameter of the DataRangeIntersection method, and by
    failing SetFormat calls. However, the port driver still insists on giving
    me the default of 44100Hz and 16bits. Even when I instruct several user
    mode apps to provide their data in the correct format, the port still
    tries to use 44100Hz and 16bits and refuses to try anything different. The
    only time I have had any success in instantiating a different data format
    is by using KsStream to directly instantiate a pin. but that doesn’t get
    me very far.

Can anyone shed some light on my predicament?