Click to Rate and Give Feedback
MSDN
MSDN Library
Visual Studio 2008
Visual Studio
 SoundPlayer in the .NET Compact Fra...

  Switch on low bandwidth view
This page is specific to
Microsoft Visual Studio 2008/.NET Framework 3.5

Other versions are also available for the following:
.NET Framework Developer's Guide
SoundPlayer in the .NET Compact Framework

The .NET Compact Framework version 3.5 supports the SoundPlayer class, which provides an intuitive API for playing sounds in applications such as casual games. To enable casual game development, the .NET Compact Framework pushes each SoundPlayer object through WaveOut, which is the audio rendering filter in Windows Embedded CE and Windows Mobile powered devices. This filter enables the device to mix sounds.

The .NET Compact Framework 3.5 supports the following types:

For a code example that demonstrates how to use this feature, see SoundPlayer.

The differences between the .NET Compact Framework implementation and the desktop implementation of SoundPlayer include the following:

  • The .NET Compact Framework supports only PCM-encoded files (uncompressed sound).

  • On a device, more than one sound can play at the same time. On the desktop, only the last sound plays.

  • On a device, the application will not terminate until playback is completed. If a sound is playing in the application loop, the application will never exit. To avoid this situation, you can explicitly terminate playback by calling the Stop or Dispose method on the SoundPlayer object.

Tags What's this?: Add a tag
Community Content   What is Community Content?
Add new content RSS  Annotations
Processing
© 2009 Microsoft Corporation. All rights reserved. Terms of Use  |  Trademarks  |  Privacy Statement
Page view tracker