我正在使用 c#.net 开发一个 sip 客户端,它具有麦克风控制,通过它我可以使麦克风静音和取消静音,当我从我的应用程序静音和取消静音时它工作得很好,问题是当我打开我的应用程序并静音麦克风,同时如果我打开Skype,麦克风有问题我不明白的是,当我在我的应用程序中静音麦克风时,它会全部静音..任何人都可以指导我如何仅在我的应用程序中静音麦克风,这不会影响Skype 等其他应用程序 .. 等。这里是麦克风静音和取消静音的代码..
private void MicMuteButton_Click(object sender, EventArgs e)
{
MixerLine micline;
mMixers = new Mixers();
mMixers.Playback.MixerLineChanged += new WaveLib.AudioMixer.Mixer.MixerLineChangeHandler(mMixer_MixerLineChanged);
mMixers.Recording.MixerLineChanged += new WaveLib.AudioMixer.Mixer.MixerLineChangeHandler(mMixer_MixerLineChanged);
micline = mMixers.Recording.UserLines.GetMixerFirstLineByComponentType(MIXERLINE_COMPONENTTYPE.SRC_MICROPHONE);
if ((string)MicMuteButton.Image.Tag == "Disabled")
{
micline.Mute = false;
MicMuteButton.Image = Properties.Resources.MicrophoneEnabled;
MicMuteButton.Image.Tag = "Enabled";
ttu.SetToolTip(MicMuteButton, "Mute");
}
else if ((string)MicMuteButton.Image.Tag == "Enabled")
{
micline.Mute = true;
MicMuteButton.Image = Properties.Resources.MicrophoneDisabled;
MicMuteButton.Image.Tag = "Disabled";
ttu.SetToolTip(MicMuteButton, "Unmute");
}
}