Working with a microphone


show more Working with a microphone provides you with in-depth training on Developer. Taught by Walt Ritscher as part of the Silverlight 5 Essential Training show less
please wait ...

Working with a microphone

Now the Silverlight works with your webcam, it's not surprising to learn that it can also capture audio with a microphone. The key component to audio capture is the AudioSink class. This class is your gateway to receiving audio information from Silverlight. For today's demo I'm using a Wav class written by a weblogger to persist my audio file. I've opened a project called WorkingWithMicrophone, and the first place I want to look is on my UI. I have three buttons here. I have a Record button, a Stop button, and a Save button. Now remember that I say we need an AudioSink, so I've created a drive class called DemoAudioSink.

As you can see, I'm deriving from the AudioSink class, and I've already written a number of methods. The most important one is down here, called OnSample. So every time information comes in from the microphone, I'm going to take this memory stream object that I've created here and I'm going to write the byte data into the memory stre...

Working with a microphone
Video duration: 3m 47s 8h 52m Beginner

Viewers:

Working with a microphone provides you with in-depth training on Developer. Taught by Walt Ritscher as part of the Silverlight 5 Essential Training

Subject:
Developer
Software:
Silverlight Visual Studio
Author:
please wait ...