mirror of
https://github.com/qTox/qTox.git
synced 2024-03-22 14:00:36 +08:00
Try to fix audio on windows
This commit is contained in:
parent
b0816696fa
commit
8f55dae70b
4
core.cpp
4
core.cpp
|
@ -1227,11 +1227,13 @@ void Core::playCallAudio(int callId, ToxAv* toxav)
|
|||
}
|
||||
qDebug() << QString("Core::playCallAudio: Error receiving audio: %1").arg(len);
|
||||
calls[callId].playAudioTimer.start();
|
||||
calls[callId].audioOutput->start(&calls[callId].audioBuffer);
|
||||
return;
|
||||
}
|
||||
if (len == 0)
|
||||
{
|
||||
calls[callId].playAudioTimer.start();
|
||||
calls[callId].audioOutput->start(&calls[callId].audioBuffer);
|
||||
return;
|
||||
}
|
||||
//qDebug() << QString("Core: Received %1 bytes, %2 audio bytes free, %3 core buffer size")
|
||||
|
@ -1241,7 +1243,7 @@ void Core::playCallAudio(int callId, ToxAv* toxav)
|
|||
if (state != QAudio::ActiveState)
|
||||
{
|
||||
qDebug() << QString("Core: Audio state is %1").arg(state);
|
||||
if (state == 3 && calls[callId].audioBuffer.bufferSize() >= framesize*2)
|
||||
//if (state == 3 && calls[callId].audioBuffer.bufferSize() >= framesize*2)
|
||||
calls[callId].audioOutput->start(&calls[callId].audioBuffer);
|
||||
}
|
||||
int error = calls[callId].audioOutput->error();
|
||||
|
|
Loading…
Reference in New Issue
Block a user