mirror of
https://github.com/Tha14/toxic.git
synced 2024-11-22 21:53:05 +01:00
Properly close audio devices on quit
This commit is contained in:
parent
ab99c1ac73
commit
65c07a57db
@ -587,11 +587,8 @@ void cmd_hangup(WINDOW *window, ToxWindow *self, Tox *m, int argc, char (*argv)[
|
||||
|
||||
#ifdef VIDEO
|
||||
callback_video_end(self->num);
|
||||
|
||||
#endif /* VIDEO */
|
||||
|
||||
|
||||
|
||||
if ( CallControl.pending_call ) {
|
||||
/* Manually send a cancel call control because call hasn't started */
|
||||
toxav_call_control(CallControl.av, self->num, TOXAV_CALL_CONTROL_CANCEL, NULL);
|
||||
@ -836,6 +833,8 @@ on_error:
|
||||
|
||||
void stop_current_call(ToxWindow* self)
|
||||
{
|
||||
TOXAV_ERR_CALL_CONTROL error;
|
||||
toxav_call_control(CallControl.av, self->num, TOXAV_CALL_CONTROL_CANCEL, &error);
|
||||
Call *this_call = &CallControl.calls[self->num];
|
||||
|
||||
if (this_call && self->is_call)
|
||||
stop_transmission(this_call, self->num);
|
||||
}
|
||||
|
@ -68,7 +68,7 @@ static void kill_infobox(ToxWindow *self);
|
||||
#ifdef AUDIO
|
||||
#define AC_NUM_CHAT_COMMANDS 30
|
||||
#else
|
||||
#define AC_NUM_CHAT_COMMANDS 23
|
||||
#define AC_NUM_CHAT_COMMANDS 22
|
||||
#endif /* AUDIO */
|
||||
|
||||
/* Array of chat command names used for tab completion. */
|
||||
@ -95,7 +95,6 @@ static const char chat_cmd_list[AC_NUM_CHAT_COMMANDS][MAX_CMDNAME_SIZE] = {
|
||||
{ "/savefile" },
|
||||
{ "/sendfile" },
|
||||
{ "/status" },
|
||||
{ "/video" },
|
||||
|
||||
#ifdef AUDIO
|
||||
|
||||
@ -106,6 +105,7 @@ static const char chat_cmd_list[AC_NUM_CHAT_COMMANDS][MAX_CMDNAME_SIZE] = {
|
||||
{ "/sdev" },
|
||||
{ "/mute" },
|
||||
{ "/sense" },
|
||||
{ "/video" },
|
||||
|
||||
#endif /* AUDIO */
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user