Skip to content

Commit

Permalink
gmenu2x: kill quit TTS only if enabled
Browse files Browse the repository at this point in the history
  • Loading branch information
Apaczer committed Jul 9, 2024
1 parent cf10fb0 commit 9938d85
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/gmenu2x.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -248,7 +248,7 @@ void GMenu2X::allyTTS(const char* text, int gap, int speed, bool wait) {

//freopen("/dev/null", "w", stdout); // nulify stdout

system("killall " TTS_ENGINE);
if (confInt["enableTTS"]) system("killall " TTS_ENGINE);
snprintf(tmp_chr, sizeof(tmp_chr), TTS_ENGINE " \"%s\" -g%i -s%i -v%s &", text, gap, speed, voice);
system(tmp_chr);
if (wait) while (system("pgrep " TTS_ENGINE) == 0) sleep(0.1);
Expand Down

0 comments on commit 9938d85

Please sign in to comment.