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

KonstantinSource codes8c4603c

master
761 B36 linesraw
1#pragma once
2#include "Utils/miscUtils.h"
3#include "Utils/WTL/atlcrack.h"
4
5// This control renders a black circle, and in the active state, the circle is filled with a bright color.
6class CircleIndicator: public CWindowImpl<CircleIndicator>
7{
8public:
9	static ATL::CWndClassInfo& GetWndClassInfo();
10
11	BEGIN_MSG_MAP( CircleIndicator )
12		MSG_WM_PAINT( onPaint )
13		MSG_WM_DESTROY( onDestroy )
14	END_MSG_MAP()
15
16	// Class registration
17	static HRESULT registerClass();
18
19	void setActive( bool nowActive );
20
21	void setActiveColor( uint32_t col )
22	{
23		activeColor = col;
24	}
25	CircleIndicator();
26
27private:
28	bool isActive = false;
29	uint32_t activeColor;
30	int fontHeight = 0;
31	CFont font;
32	HRESULT createFont( int height );
33
34	void onDestroy();
35	void onPaint( CDCHandle dc );
36};