1

As i know SoundPlayer plays only .wav files..And what is the point of it if Audio can play any format(if you have the right codec)? Isnt it better to just use Audio in your classes and be happy?

0x49D1
  • 8,505
  • 11
  • 76
  • 127

1 Answers1

1

The biggest reason why you might not want to use Audio would be due to the dependency on DirectX. Granted with systems today that isn't typically an issue as DirectX support is pretty much there across the board.

The key here is "built in" functionality which is what SoundPlayer is, and extension type functionality which is what Audio is.

Mitchel Sellers
  • 62,228
  • 14
  • 110
  • 173
  • Thank you for clear answer. But if i write for windows(XP or newer) using .net what should i use?..Seems that Audio gives me more possibilities to work with sounds(wider range), and the methods from SoundPlayer that are missing in Audio can be written separately if we need to. DirectX is kind of built in too :), not in .NET, but in system. – 0x49D1 Oct 18 '11 at 14:50
  • In most cases I'd say that using Audio would be just fine. Unless say you were trying to target WIndows Mobile, or other devices. As otherwise DirectX support should be there. – Mitchel Sellers Oct 18 '11 at 14:58