Is it possible to modify the monitoring volume of my microphone in my speaker?

36 Views Asked by At

I have a Audio-Technica atr2100x. This microphone is connected through USB to the computer and it also has an AUX out to be able to connect headphones. When i talk into the microphone, i can hear my own voice because the microphone has monitoring capabilities.

In windows i am able to control the volume of the monitoring and even mute it completely. This is done by going to the Playback tab, selecting the headphones and changing the microphone slider in the Levels tab. TAKE INTO CONSIDERATION, that this is independent of the microphone volume itself. This only affects the volume in which i hear myself.

enter image description here

QUESTION: Is it possible to modify this volume programatically?

This is the current code i use to mute/unmute the microphone. I was using it with a Q2U, and when muting the microphone, it would also mute the monitoring. It's not the case with this new mic. When i mute it, i can still hear myself, and it's annoying.

using System.Diagnostics;
using System.Runtime.InteropServices;
using Microsoft.Toolkit.Uwp.Notifications;
using Windows.Media.Capture;

namespace MicMute
{
    class Program
    {
        private const int WM_APPCOMMAND = 0x319;
        private const int APPCOMMAND_MICROPHONE_VOLUME_MUTE = 0x180000;
        [DllImport("user32.dll", SetLastError = false)]
        public static extern IntPtr SendMessageW(IntPtr hWnd, int Msg, IntPtr wParam, IntPtr lParam);
        static void Main()
        {
            var oMediaCapture = new MediaCapture();

            oMediaCapture.InitializeAsync(new MediaCaptureInitializationSettings
            {
                MediaCategory = MediaCategory.Speech,
                StreamingCaptureMode = StreamingCaptureMode.Audio
            }).AsTask().Wait();

            var audioDeviceController = oMediaCapture.AudioDeviceController;

            var h = Process.GetProcessesByName("explorer").First().MainWindowHandle;
            SendMessageW(h, WM_APPCOMMAND, IntPtr.Zero, (IntPtr)APPCOMMAND_MICROPHONE_VOLUME_MUTE);

        }
    }
}
0

There are 0 best solutions below