mirror of
https://github.com/Tha14/toxic.git
synced 2024-11-23 01:23:03 +01:00
possibly fix sound notification bug
This commit is contained in:
parent
be264528d2
commit
f7d46f1100
13
src/notify.c
13
src/notify.c
@ -209,6 +209,7 @@ void graceful_clear()
|
||||
}
|
||||
#endif
|
||||
|
||||
if(actives[i].id_indicator)
|
||||
*actives[i].id_indicator = -1; /* reset indicator value */
|
||||
|
||||
if ( actives[i].looping ) {
|
||||
@ -251,6 +252,9 @@ void* do_playing(void* _p)
|
||||
&& !actives[i].box
|
||||
#endif
|
||||
) {
|
||||
if(actives[i].id_indicator)
|
||||
*actives[i].id_indicator = -1; /* reset indicator value */
|
||||
|
||||
if (!is_playing(actives[i].source)) {
|
||||
/* Close */
|
||||
alSourceStop(actives[i].source);
|
||||
@ -265,6 +269,7 @@ void* do_playing(void* _p)
|
||||
GError* ignore;
|
||||
notify_notification_close(actives[i].box, &ignore);
|
||||
actives[i].box = NULL;
|
||||
if(actives[i].id_indicator)
|
||||
*actives[i].id_indicator = -1; /* reset indicator value */
|
||||
|
||||
if (!actives[i].looping && !is_playing(actives[i].source)) {
|
||||
@ -322,7 +327,9 @@ void* do_playing(void* _p)
|
||||
GError* ignore;
|
||||
notify_notification_close(actives[i].box, &ignore);
|
||||
actives[i].box = NULL;
|
||||
if(actives[i].id_indicator)
|
||||
*actives[i].id_indicator = -1; /* reset indicator value */
|
||||
|
||||
memset(&actives[i], 0, sizeof(struct _ActiveNotifications));
|
||||
}
|
||||
}
|
||||
@ -344,7 +351,9 @@ void graceful_clear()
|
||||
actives[i].box = NULL;
|
||||
}
|
||||
|
||||
if (actives[i].id_indicator)
|
||||
*actives[i].id_indicator = -1; /* reset indicator value */
|
||||
|
||||
memset(&actives[i], 0, sizeof(struct _ActiveNotifications));
|
||||
}
|
||||
|
||||
@ -377,6 +386,7 @@ int init_notify(int login_cooldown, int notification_timeout)
|
||||
pthread_mutex_destroy(Control.poll_mutex);
|
||||
return -1;
|
||||
}
|
||||
|
||||
Control.poll_active = 1;
|
||||
#endif
|
||||
|
||||
@ -388,7 +398,7 @@ int init_notify(int login_cooldown, int notification_timeout)
|
||||
|
||||
|
||||
#ifdef BOX_NOTIFY
|
||||
notify_init("toxic");
|
||||
notify_init("Toxic");
|
||||
#endif
|
||||
Control.notif_timeout = notification_timeout;
|
||||
return 1;
|
||||
@ -478,6 +488,7 @@ void stop_sound(int id)
|
||||
notify_notification_close(actives[id].box, &ignore);
|
||||
}
|
||||
#endif
|
||||
if (actives[id].id_indicator)
|
||||
*actives[id].id_indicator = -1;
|
||||
// alSourcei(actives[id].source, AL_LOOPING, false);
|
||||
alSourceStop(actives[id].source);
|
||||
|
Loading…
Reference in New Issue
Block a user