Chapter 20. Audio and Video

Overview of Audio

In most of the areas I've covered throughout this text, WPF allows the programmer far more expressiveness than in previous frameworks. The audio features it provides, however, aren't particularly impressive. Instead, they are little more than wrappers around Win32 APIs or the Windows Media Player.

WPF provides four classes for producing sound. They are the following—starting with the simplest (and least useful) and progressing to the most useful:

  • The SystemSounds class can produce several of the commonly used operating system sounds.

  • The SoundPlayer class is used for short, simple .wav format files where the only thing you require is to be able to start the sound file.

  • The MediaPlayer class allows you to ...

Get Illustrated WPF now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.