[wdmaudiodev] Re: Which audio model is best

  • From: Tim Roberts <timr@xxxxxxxxx>
  • To: "wdmaudiodev@xxxxxxxxxxxxx" <wdmaudiodev@xxxxxxxxxxxxx>
  • Date: Wed, 9 Mar 2011 15:27:09 -0800

Basileios Bu wrote:
> ,
> I will be writing audio drivers for a USB device which must support
> ASIO and WDM Audio.  Both sources will be mixed into a common buffer
> before being sent over the USB (or vice-versa).  Now I have worked
> with portcls wavecyclic, though this was some time ago.  I would like
> to know if there is an significant reason to use avstream instead of
> portcls wavecyclic, since moving to avstream would add significant
> time for the learning curve.

No.  Both architectures work, and are likely to continue to work at
least through this decade.  If you are comfortable with wavecyclic, I
say stick with it.  It is my personal opinion that AVStream is cleaner,
but as you say, there will be a learning curve.  That's not an
insignificant consideration.

> I've read in these archives that supposedly avstream is more flexible,
> but I would like to know just how, ...

I'm not sure I agree with that.  Mostly, they are simply two different
approaches to the exact same end result.  They're just spelled
differently.  As I said, I think the AVStream architecture is cleaner,
but I'm not convinced there's anything you can do in AVStream that
cannot also be done in portcls, or vice versa.

> Finally, assuming that I don't have to support WinXP (unlikely, but
> not final), is WaveRT a viable choice?  Based on this statement from
> the WDK "WaveRT avoids any need for intervention by the miniport
> driver in the flow of audio data between the application and the audio
> hardware.", I'm not sure it would be viable for me, since I need to
> mix two sources (at least) into a common buffer.  WavePci is
> disqualified for a related reason, i.e. since a copy is necessary,
> there is no gain from the extra complexity.

Tough call.  WaveRT was really designed for PCI devices that have an
independently operating DMA engine.  The whole point of WaveRT is that
the user-mode audio engine can manage the circular buffers on its own,
without ever invoking kernel code at all.  It is POSSIBLE to write a
WaveRT driver for a device that doesn't use DMA, but that's not what the
model was designed for.  It is fitting a square peg in a round hole.

Tim Roberts, timr@xxxxxxxxx
Providenza & Boekelheide, Inc.


WDMAUDIODEV addresses:
Post message: mailto:wdmaudiodev@xxxxxxxxxxxxx
Subscribe:    mailto:wdmaudiodev-request@xxxxxxxxxxxxx?subject=subscribe
Unsubscribe:  mailto:wdmaudiodev-request@xxxxxxxxxxxxx?subject=unsubscribe
Moderator:    mailto:wdmaudiodev-moderators@xxxxxxxxxxxxx


Other related posts: