Enforce signed licenses and seamless track handoff
Independent component release / publish (push) Failing after 11s
Independent component release / publish (push) Failing after 11s
This commit is contained in:
15 files changed
+1367
-98
No files matched your search
@@ -0,0 +1,34 @@
|
||||
#include "echoion/core/playback/GaplessHandoff.hpp"
|
||||
|
||||
#include <iostream>
|
||||
|
||||
namespace
|
||||
{
|
||||
int failures = 0;
|
||||
|
||||
void expect(bool condition, const char* message)
|
||||
{
|
||||
if (!condition) {
|
||||
std::cerr << "FAILED: " << message << '\n';
|
||||
++failures;
|
||||
}
|
||||
}
|
||||
} // namespace
|
||||
|
||||
int main()
|
||||
{
|
||||
using Echoion::Core::PlaybackDetail::canFillDeviceFrame;
|
||||
|
||||
expect(canFillDeviceFrame(300, 700, 1000),
|
||||
"outgoing tail and incoming head can exactly fill a frame");
|
||||
expect(canFillDeviceFrame(300, 900, 1000),
|
||||
"extra incoming PCM is retained for the next frame");
|
||||
expect(!canFillDeviceFrame(300, 699, 1000),
|
||||
"handoff waits rather than padding when incoming PCM is short");
|
||||
expect(!canFillDeviceFrame(0, 1000, 1000),
|
||||
"an empty outgoing tail is a normal track-end path");
|
||||
expect(!canFillDeviceFrame(1000, 1000, 1000),
|
||||
"a complete outgoing frame does not need a boundary join");
|
||||
|
||||
return failures == 0 ? 0 : 1;
|
||||
}
|
||||
Reference in new issue
Block a user