Search code examples
silverlightmacosmicrophone

Silverlight Mac microphone volume


I've got an SL4 application that (among other things) captures audio from a user's microphone and plays it back. It all works reasonably well on a PC, but I'm having a lot of trouble getting it to work correctly on our test Macintosh. For one thing, it seems to ignore the AudioCaptureDevice.AudioFrameSize: I've set it to 20 ms, which means that at 16000 samples per second, it should return 640 bytes 50 times per second. Instead, my AudioSink.OnSamples() is consistently called with a 1024 byte array 32 times/second. Odd, and annoying, but I can correct for that.

The bigger problem is that the audio I'm capturing is very, very quiet. When I'm capturing audio on my PC, and I tap on the webcam that's the source of the audio, I get samples in the +/- 10,000 range. However, when I'm capturing audio on my test Macintosh, and I tap on the webcam, I get samples in the +/- 100 range. If I record anything on the Mac's webcam microphone and then play it back, I effectively can't hear anything at all. (I'm using an MS Lifecam HD-5000, if that makes any difference.)

I know that the webcam's microphone is working, as it works just fine with Skype.

Any suggestions for troubleshooting this? Anybody else run into similar issues?


Solution

  • Turned out to be a stupid configuration issue that I should have checked first. For some reason, OSX had initially set the webcam's microphone to "0" out of 10. Not sure why, but as soon as I went to System Preferences / Sound / Input, and adjusted the Input Volume, the webcam microphone started working as advertised.