WPF MediaPlayer does not play sounds on some computers

I created a WPF application that plays sounds using the MediaPlayer class.

This works great on many computers, but there are 2 computers that play normal sounds (and they also play .wav from the application when opened using Windows Media Player), but they do not play sounds when opened with my application.

I do not get an error message or anything else, they just refuse to play the sound.

PCs run Windows XP, but so do others, on which the sound plays great.

Is there any known requirement for MediaPlayer to work in WPF? I have no idea which direction I should start looking.

.NET client framework 4.0 is installed on all computers. We tested on about 6 PCs with various equipment, and on 2 of them we have no sound in the application.

Any idea?

+4
source share
2 answers

The problem was that Windows Media Player 9 was installed on these PCs. An update for WMP 11 fixed the problem.

+1
source

May be related to codec. WAV is just a container file format. Actual audio data is encoded using a specific codec that must be present on the machine being played. I had a similar problem trying to play WAV in Silverlight, and when I converted to WMA, it worked fine.

+1
source

Source: https://habr.com/ru/post/1308125/


All Articles