O'Reilly logo

Pro WPF in C# 2008: Windows Presentation Foundation with .NET 3.5, Second Edition by Matthew MacDonald

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Playing WAV Audio

The .NET Framework has a sketchy history of sound support. Versions 1.0 and 1.1 didn't include any managed way to play audio, and when the long-delayed support finally appeared in .NET 2.0, it was in the form of the rather underwhelming SoundPlayer class (which you can find in the underpopulated System.Media namespace). The SoundPlayer is severely limited: it can play only WAV audio files, it doesn't support playing more than one sound at once, and it doesn't provide the ability to control any aspect of the audio playback (for example, details such as volume and balance). To get these features, developers using the Windows Forms toolkit had to work with the unmanaged quartz.dll library.

NOTE

The quartz.dll library is a key ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required