1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34
| void *eycandy (void * arg)
{
while (globale.animations == 1) // Si on est en mode animation on s'amuse, sinon le thread se suicide.
{
if (globale.lecture_pause == 1) // Si on est en lecture on anime la lecture.
{
char tmp;
tmp = globale.anime_radio [0]; // On retient le premier caractère.
pthread_mutex_lock (&globale.mut);
int a = 0;
for (a = 0; globale.anime_radio [a+1] != '\0'; a++)
{
globale.anime_radio [a] = globale.anime_radio [a+1] ;
}
pthread_mutex_unlock (&globale.mut);
globale.anime_radio[a] = tmp; // On place l'ancien premier caractère a la fin.
gtk_label_set_label (GTK_LABEL (interface.label), globale.anime_radio);
usleep (150000);
while (gtk_events_pending ())
gtk_main_iteration ();
}
if (globale.lecture_pause == 0) // Si on est en pause on anime la pause.
{
}
}
pthread_exit (0);
} |
Partager