Skip to content

Commit

Permalink
Set sample rates 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 f09459c commit f917388
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions FlexASIOTest/test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,11 @@ namespace flexasio_test {
return PrintError(ASIOCanSampleRate(sampleRate)) == ASE_OK;
}

bool SetSampleRate(ASIOSampleRate sampleRate) {
std::cout << "ASIOSetSampleRate(" << sampleRate << ")" << std::endl;
return PrintError(ASIOSetSampleRate(sampleRate)) == ASE_OK;
}

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

Expand All @@ -104,8 +109,8 @@ namespace flexasio_test {

std::cout << std::endl;

for (const auto sampleRate : { 44100, 48000, 96000, 192000 }) {
CanSampleRate(sampleRate);
for (const auto sampleRate : { 44100, 96000, 192000, 48000 }) {
if (!(CanSampleRate(sampleRate) && SetSampleRate(sampleRate) && GetSampleRate() == sampleRate) && sampleRate == 48000) return false;
}

// Note: we don't call ASIOExit() because it gets confused by our driver setup trickery (see InitAndRun()).
Expand Down

0 comments on commit f917388

Please sign in to comment.