We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
import koffi from 'koffi' const oleacc = koffi.load('oleacc.dll'); const user32 = koffi.load('user32.dll'); const DWORD = koffi.alias('DWORD', 'uint32_t'); const HANDLE = koffi.pointer(koffi.opaque('HANDLE')); const HWND = koffi.alias('HWND', HANDLE); const ANRUS_PRIORITY_AUDIO_ACTIVE = 0x0000004; const ANRUS_PRIORITY_AUDIO_ACTIVE_NODUCK = 0x0000008; const getHwnd = user32.func('HWND __stdcall GetForegroundWindow()'); const voiceChange = oleacc.func('int __stdcall AccSetRunningUtilityState(HWND hwndApp, DWORD dwUtilityStateMask, DWORD dwUtilityState)'); const hwnd = getHwnd(); ipcMain.on('voice-down', () => { voiceChange (hwnd, ANRUS_PRIORITY_AUDIO_ACTIVE | ANRUS_PRIORITY_AUDIO_ACTIVE_NODUCK, ANRUS_PRIORITY_AUDIO_ACTIVE | ANRUS_PRIORITY_AUDIO_ACTIVE_NODUCK) }) ipcMain.on('voice-up', () => { voiceChange(hwnd, ANRUS_PRIORITY_AUDIO_ACTIVE | ANRUS_PRIORITY_AUDIO_ACTIVE_NODUCK, ANRUS_PRIORITY_AUDIO_ACTIVE_NODUCK) })
The text was updated successfully, but these errors were encountered:
No branches or pull requests
The text was updated successfully, but these errors were encountered: