How to control the microphone (volume & mute/unmute) for playback device? i.e. for sidetone requirement.
-
Wednesday, April 25, 2012 7:59 AM
I need to control microphone for playback device to address sidetone requirement (microphone feedback provided to user through headset speaker)
i.e.
1. Un-muting the microphone for playback
2. Adjusting the volume to set the level of feedback
Will this be possible using the directshow interfaces like IBasicAudio or similar? If not what are the options?
Thanks in advance.
All Replies
-
Wednesday, April 25, 2012 3:59 PM
You need an Infinite Pin Tee Filter in your DirectShow graph.
Creating an Audio Capture Graph with Preview
http://msdn.microsoft.com/en-us/library/windows/desktop/dd375006(v=vs.85).aspxGeneral Info: Audio Capture (DirectShow)
http://msdn.microsoft.com/en-us/library/windows/desktop/dd317585(v=vs.85).aspxFor Win7 you should prefer Media Foundation rather than DirectShow:
http://msdn.microsoft.com/en-us/library/windows/desktop/dd317912(v=vs.85).aspx
See "CreateAudioCaptureDevice"
for preview use WASAPI (audio endpoint device)
http://msdn.microsoft.com/en-us/library/windows/desktop/dd371455(v=vs.85).aspx(audio endpoint device:
http://msdn.microsoft.com/en-us/library/windows/desktop/dd370793(v=vs.85).aspx -
Thursday, April 26, 2012 8:04 AM
Thanks for your valuable input.
Option 1/2 I was aware of and already tried the preview with help of Infinite Pin Tee Filter. Its was working.
However I would like to know if there is any directshow interface like IAMAudioInputMixer (which is used to control the volume/mute for microphone for recording device) that can be used to control the volume/mute for microphone for playback device as user audio feedback (sidetone)
-
Thursday, April 26, 2012 2:26 PM
the playback is done through DirectSound Renderer and there you can use IBasicAudio interface.
So did you obtain it from the filter graph manager?
"Applications should always retrieve this interface from the Filter Graph Manager" http://msdn.microsoft.com/en-us/library/windows/desktop/dd389532(v=vs.85).aspx
IBasicAudio::put_Volume method http://msdn.microsoft.com/en-us/library/windows/desktop/dd389538(v=vs.85).aspx "Specifies the volume, as a number from –10,000 to 0, inclusive. Full volume is 0, and –10,000 is silence. Multiply the desired decibel level by 100. For example, –10,000 = –100 dB."
you can change the volume for test if you make a test in graphedt. SNKAUDIO is a custom audio sink filter. preview is what you hear on the headphones/speaker
- Edited by CA 2 LA Friday, April 27, 2012 3:18 AM


