On-Off Mouse-Keyboard By Microphone Sound Level
-
Hallo, I need to make in practice a application running in WIN7. This application must read continuously the sound(noise) received from the microphone and, if the level of the sound(noise) is higher that a adjusted value, to activate to display a Jpeg image on the screen and at the same time to deactivate the sound, the mouse and the keyboard. To have a adjusted delay and after the delay time to reactivate the sound, the mouse and the keyboard. This application must start at StartUp of PC. I need to use this application in a computer class room at every PC with WIN7. This can be a batch file or a C++ or everything else.
-
Hallo, I need to make in practice a application running in WIN7. This application must read continuously the sound(noise) received from the microphone and, if the level of the sound(noise) is higher that a adjusted value, to activate to display a Jpeg image on the screen and at the same time to deactivate the sound, the mouse and the keyboard. To have a adjusted delay and after the delay time to reactivate the sound, the mouse and the keyboard. This application must start at StartUp of PC. I need to use this application in a computer class room at every PC with WIN7. This can be a batch file or a C++ or everything else.
I have a information from Matthew van Eerde: If you had said Windows 8 I would have recommended the MediaCapture API. As it is, with Windows 7 I suggest using IAudioMeterInformation. When your program starts up, grab the default recording device via IMMDeviceEnumerator::GetDefaultAudioEndpoint and activate an IAudioMeterInformation. Then query the peak value in a loop, and if it exceeds your threshold value, do whatever. IMMDeviceEnumerator *pMMDeviceEnumerator hr = CoCreateInstance( __uuidof(MMDeviceEnumerator), NULL, CLSCTX_ALL, __uuidof(IMMDeviceEnumerator), (void**)&pMMDeviceEnumerator ) if (FAILED(hr)) { ... } IMMDevice *pMMDevice hr = pMMDeviceEnumerator->GetDefaultAudioEndpoint(eCapture, eConsole, &pMMDevice) if (FAILED(hr)) { ... } IAudioMeterInformation *pAudioMeterInformation hr = pMMDevice->Activate( __uuidof(IAudioMeterInformation), CLSCTX_ALL, NULL, (void**)&pAudioMeterInformation ); if (FAILED(hr)) { ... } while (...) { float peak; hr = pAudioMeterInformation->GetPeakValue(&peak); if (FAILED(hr)) { ... } if (peak > ... ) { ... } ... }
-
Hallo, I need to make in practice a application running in WIN7. This application must read continuously the sound(noise) received from the microphone and, if the level of the sound(noise) is higher that a adjusted value, to activate to display a Jpeg image on the screen and at the same time to deactivate the sound, the mouse and the keyboard. To have a adjusted delay and after the delay time to reactivate the sound, the mouse and the keyboard. This application must start at StartUp of PC. I need to use this application in a computer class room at every PC with WIN7. This can be a batch file or a C++ or everything else.
Okay. So what is your question?
The difficult we do right away... ...the impossible takes slightly longer.
-
Okay. So what is your question?
The difficult we do right away... ...the impossible takes slightly longer.