Search code examples
c#audionaudiodirectsoundwasapi

Should I use DirectSound or WASAPI for my audio project?


I am starting a project where minimum requirements will be Windows 7. I'll be using NAudio as my interface to audio. I am not sure what I should be using: DirectSound or WASAPI? I am going to be doing the following:

  1. Manipulating volume/mute on multiple USB sound cards for both speaker and the microphone.
  2. Rerouting input from sound card 2 into the output of the sound card 2 (if that's possible).
  3. Manipulating the audio input of the sound card with some effects.

I understand that behind the scenes DirectSound processes all the audio via WASAPI anyway and it sounds like DirectSound has joined the list of deprecated technologies.

However, my question is more from a functional level: which API will let me do what I described above.


Solution

  • where minimum requirements will be Windows 7

    Certainly WASAPI - you have better control over things, WASAPI interfaces/API are well made and easier to use, less overhead if you need to be close to real time. There is nothing on th elist that DirectSound can give you and WASAPI can not.

    The only reason to use DirectSound if you need pre-Vista systems where WASAPI was just not available.