What is better solution for playing sounds in .net application: Audio from DirectX lib or System.Media.SoundPlayer?

StackOverflow https://stackoverflow.com/questions/7808591

Question

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?

Was it helpful?

Solution

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.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top