Skip to content

Commit

Permalink
Get latencies in FlexASIOTest.
Browse files Browse the repository at this point in the history
See #7.
  • Loading branch information
dechamps committed Oct 21, 2018
1 parent ee0e8e8 commit 5dd19fb
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions FlexASIOTest/test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -172,6 +172,13 @@ namespace flexasio_test {
return Buffers(bufferInfos);
}

void GetLatencies() {
long inputLatency = LONG_MIN, outputLatency = LONG_MIN;
std::cout << "ASIOGetLatencies()" << std::endl;
if (PrintError(ASIOGetLatencies(&inputLatency, &outputLatency)) != ASE_OK) return;
std::cout << "Latencies: input " << inputLatency << " samples, output " << outputLatency << " samples" << std::endl;
}

bool Run() {
if (!Init()) return false;

Expand Down Expand Up @@ -220,6 +227,10 @@ namespace flexasio_test {

std::cout << std::endl;

GetLatencies();

std::cout << std::endl;

// Note: we don't call ASIOExit() because it gets confused by our driver setup trickery (see InitAndRun()).
// That said, this doesn't really matter because ASIOExit() is basically a no-op in our case, anyway.
return true;
Expand Down

0 comments on commit 5dd19fb

Please sign in to comment.