Remove Opus FEC for now

monitor
Phil Taylor 2022-05-07 11:14:01 +01:00
rodzic 3068b0f5cc
commit bbbb36ebae
1 zmienionych plików z 7 dodań i 6 usunięć

Wyświetl plik

@ -96,12 +96,13 @@ bool audioConverter::convert(audioPacket audio)
QByteArray outPacket(nSamples * sizeof(float) * inFormat.channelCount(), (char)0xff); // Preset the output buffer size.
float* out = (float*)outPacket.data();
if (audio.seq > lastAudioSequence + 1) {
nSamples = opus_decode_float(opusDecoder, Q_NULLPTR, 0, out, nSamples, 1);
}
else {
//if (audio.seq > lastAudioSequence + 1) {
// nSamples = opus_decode_float(opusDecoder, Q_NULLPTR, 0, out, nSamples, 1);
//}
//else {
nSamples = opus_decode_float(opusDecoder, in, audio.data.size(), out, nSamples, 0);
}
//}
//lastAudioSequence = audio.seq;
audio.data.clear();
audio.data = outPacket; // Replace incoming data with converted.
}