Drain startup audio on END and validate Opus fixture failures
This commit is contained in:
1 parent
f42b085e12
commit
79701feef1
2 files changed
+11
-3
No files matched your search
@@ -196,7 +196,11 @@ private slots:
|
||||
pcm[2 * i + 1] = static_cast<int16_t>(1500 * std::sin((sampleFrame + i) * 0.13));
|
||||
}
|
||||
sampleFrame += 960;
|
||||
int length = opus_codec_encode(opus.get(), pcm, 960, encoded, sizeof(encoded)); QVERIFY(length > 0);
|
||||
int length = opus_codec_encode(opus.get(), pcm, 960, encoded, sizeof(encoded));
|
||||
if (length <= 0) {
|
||||
DEBUG_ERROR(DEBUG_CATEGORY_STREAM, "desktop startup fixture Opus encode failed result=%d", length);
|
||||
return QList<QByteArray>{};
|
||||
}
|
||||
packets.append(QByteArray(reinterpret_cast<const char*>(encoded), length));
|
||||
}
|
||||
return packets;
|
||||
|
||||
Reference in new issue
Block a user