yum-archive/TaSTT-Whisper
High-performance GPGPU inference of OpenAI's Whisper automatic speech recognition (ASR) model
git clone https://git.yummers.dev/yum-archive/TaSTT-Whisper
8c4603c
master
1#include "stdafx.h" 2#include "PendingState.h" 3 4void PendingState ::initialize ( std::initializer_list < HWND > editors , std::initializer_list < HWND > pending ) 5{ 6editorsWindows = editors ; 7wasEnabled .resize (editorsWindows .size () ); 8pendingWindows = pending ; 9} 10 11void PendingState ::setPending (bool nowPending ) 12{ 13if (nowPending ) 14 { 15for (size_t i = 0 ;i < editorsWindows .size ();i ++ ) 16 { 17BOOL e = IsWindowEnabled (editorsWindows [i ] ); 18if (e ) 19 { 20wasEnabled [i ]= true; 21EnableWindow (editorsWindows [i ], FALSE ); 22 } 23else 24wasEnabled [i ]= false; 25 } 26 } 27else 28 { 29for (size_t i = 0 ;i < editorsWindows .size ();i ++ ) 30 { 31if ( !wasEnabled [i ] ) 32continue ; 33EnableWindow (editorsWindows [i ], TRUE ); 34 } 35 } 36 37const int show = nowPending ?SW_NORMAL :SW_HIDE ; 38for (HWND w :pendingWindows ) 39 ::ShowWindow (w ,show ); 40}