In some applications, particularly touch-screen kiosk apps andcasual games, it is desirable to be able to play a soundimmediately upon a user action. For example, you may want to play a"click" sound when they press a key on an on-screen keyboard, orplay a series of laser sounds when their on-screen spaceship firesits weapons.
Please note that this article and the attached sample code waswritten using the Silverlight 5 Beta, available at MIX11 in April2011.
In previous versions of Silverlight, developers used a varietyof tricks, including pre-loading sounds into a round-robin bufferof MediaElements in order to provide as low latency as possible.Windows Phone 7 introduced the XNA SoundEffect class to Silverlightdevelopers. Silverlight 5 now includes that class as well.
Project SetupCreate a regular Silverlight 5 application. Most of the Xnalibraries are in the core Silverlight runtime (some additional oneswill be in the samples for t ...
Go to the complete details ...