O'Reilly logo

Windows® Phone 8 Unleashed by Daniel Vaughan

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

Recording Audio with the Microphone

The XNA Microphone class allows you to capture audio data from the phone’s microphone. Microphone resides in the Microsoft.Xna.Framework.Audio namespace.

To use the Microphone class you need to create a GameTimer to pump the XNA FrameworkDispatcher. XNA components usually rely on initialization of the XNA environment before they can be used, and the Microphone class is no exception. Creating a GameTimer to pump the XNA FrameworkDispatcher normally involves adding some code to your App class that creates a GameTimer and subscribes to its FrameAction event. For more information on initializing the XNA environment, see Chapter 7, “Employing Media and Web Elements.”

Microphone does not have a public constructor; ...

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