mirror of
https://github.com/qTox/qTox.git
synced 2024-03-22 14:00:36 +08:00
Fix vol/mic toggle buttons
They were suffering from double-connection syndrom, and the way muting worked was now conflicting with how the output sound level setting works Fixes #1442
This commit is contained in:
parent
c8ff943dae
commit
600401a606
|
@ -244,7 +244,7 @@ void Core::playCallAudio(void* toxav, int32_t callId, const int16_t *data, uint1
|
|||
{
|
||||
Q_UNUSED(user_data);
|
||||
|
||||
if (!calls[callId].active)
|
||||
if (!calls[callId].active || calls[callId].muteVol)
|
||||
return;
|
||||
|
||||
if (!calls[callId].alSource)
|
||||
|
@ -356,10 +356,7 @@ void Core::micMuteToggle(int32_t callId)
|
|||
void Core::volMuteToggle(int32_t callId)
|
||||
{
|
||||
if (calls[callId].active)
|
||||
{
|
||||
calls[callId].muteVol = !calls[callId].muteVol;
|
||||
alSourcef(calls[callId].alSource, AL_GAIN, calls[callId].muteVol ? 0.f : 1.f);
|
||||
}
|
||||
}
|
||||
|
||||
void Core::onAvCancel(void* _toxav, int32_t callId, void* core)
|
||||
|
|
|
@ -91,8 +91,6 @@ ChatForm::ChatForm(Friend* chatFriend)
|
|||
connect(videoButton, &QPushButton::clicked, this, &ChatForm::onVideoCallTriggered);
|
||||
connect(msgEdit, &ChatTextEdit::enterPressed, this, &ChatForm::onSendTriggered);
|
||||
connect(msgEdit, &ChatTextEdit::textChanged, this, &ChatForm::onTextEditChanged);
|
||||
connect(micButton, SIGNAL(clicked()), this, SLOT(onMicMuteToggle()));
|
||||
connect(volButton, SIGNAL(clicked()), this, SLOT(onVolMuteToggle()));
|
||||
connect(Core::getInstance(), &Core::fileSendFailed, this, &ChatForm::onFileSendFailed);
|
||||
connect(this, SIGNAL(chatAreaCleared()), getOfflineMsgEngine(), SLOT(removeAllReciepts()));
|
||||
connect(&typingTimer, &QTimer::timeout, this, [=]{
|
||||
|
|
Loading…
Reference in New Issue
Block a user