diff options
| author | yum <yum.food.vr@gmail.com> | 2023-06-27 15:35:30 -0700 |
|---|---|---|
| committer | yum <yum.food.vr@gmail.com> | 2023-06-27 15:38:42 -0700 |
| commit | 241813a5af11093c6b86e70ada729788c1f0dee6 (patch) | |
| tree | 0d0f31367cbe4bd0f2e7d174deead936e70bdf07 /GUI | |
| parent | cf75998dab6db1b1d21ca06bde18a56b5e896937 (diff) | |
Adjust commit logic to use fuzzy string match threshold
... instead of simple equality.
TODO: add UI for threshold.
Bugfix: Frame::onAppStop() joins the OBS app thread.
Diffstat (limited to 'GUI')
| -rw-r--r-- | GUI/GUI/GUI/Frame.cpp | 18 |
1 files changed, 13 insertions, 5 deletions
diff --git a/GUI/GUI/GUI/Frame.cpp b/GUI/GUI/GUI/Frame.cpp index f4e99b9..8d4c868 100644 --- a/GUI/GUI/GUI/Frame.cpp +++ b/GUI/GUI/GUI/Frame.cpp @@ -2122,16 +2122,24 @@ void Frame::OnAppStart(wxCommandEvent& event) { }
void Frame::OnAppStop() {
+ run_py_app_ = false;
auto status = py_app_.wait_for(std::chrono::seconds(0));
if (status == std::future_status::ready) {
Log(transcribe_out_, "Transcription engine already stopped\n");
- return;
}
- run_py_app_ = false;
- py_app_.wait();
- obs_app_.wait();
+ else {
+ py_app_.wait();
+ Log(transcribe_out_, "Stopped transcription engine\n");
+ }
+ status = obs_app_.wait_for(std::chrono::seconds(0));
+ if (status == std::future_status::ready) {
+ Log(transcribe_out_, "Browser source already stopped\n");
+ }
+ else {
+ obs_app_.wait();
+ Log(transcribe_out_, "Stopped browser source\n");
+ }
transcript_.Clear();
- Log(transcribe_out_, "Stopped transcription engine\n");
}
void Frame::OnAppStop(wxCommandEvent& event) {
|
