1
0
mirror of https://github.com/Tha14/toxic.git synced 2024-07-01 16:47:46 +02:00

Reduce sound notify polling by factor of 10

Polling 100 times per second is excessive. This should help reduce
Toxic's resource usage without a noticable difference to the user.
This commit is contained in:
jfreegman 2021-11-21 14:52:09 -05:00
parent 0a708e4a2e
commit 3fddc410b3
No known key found for this signature in database
GPG Key ID: 3627F3144076AE63
2 changed files with 2 additions and 4 deletions

View File

@ -318,7 +318,7 @@ void *do_playing(void *_p)
has_looping = false; has_looping = false;
control_unlock(); control_unlock();
sleep_thread(10000L); sleep_thread(100000L);
} }
pthread_exit(NULL); pthread_exit(NULL);

View File

@ -808,15 +808,13 @@ void draw_active_window(Tox *m)
a->onDraw(a, m); a->onDraw(a, m);
wrefresh(a->window); wrefresh(a->window);
} }
#ifdef AUDIO #ifdef AUDIO
else if (a->is_call && timed_out(a->chatwin->infobox.lastupdate, 1)) { else if (a->is_call && timed_out(a->chatwin->infobox.lastupdate, 1)) {
touchwin(a->window); touchwin(a->window);
a->onDraw(a, m); a->onDraw(a, m);
wrefresh(a->window); wrefresh(a->window);
} }
#endif // AUDIO
#endif
#ifdef GAMES #ifdef GAMES