add silence if audio has stopped

merge-requests/5/head
Phil Taylor 2021-05-30 11:36:13 +01:00
rodzic d2375a9065
commit 05fc1677d4
1 zmienionych plików z 4 dodań i 0 usunięć

Wyświetl plik

@ -236,6 +236,10 @@ int audioHandler::readData(void* outputBuffer, void* inputBuffer, unsigned int n
}
//qDebug(logAudio()) << "looking for: " << nBytes << " got: " << sentlen;
// fill the rest of the buffer with silence
if (nBytes > sentlen) {
memset(buffer+sentlen,0,nBytes-sentlen);
}
return 0;
}