diff options
| author | Gary Scavone <gary.scavone@mcgill.ca> | 2022-03-17 20:42:57 -0400 |
|---|---|---|
| committer | Gary Scavone <gary.scavone@mcgill.ca> | 2022-03-17 20:42:57 -0400 |
| commit | cfb361a7dbf0f597ad5bf26f73527fabbba87980 (patch) | |
| tree | 537024bbd19501219a2ebbf2e6c1fbc71ca055a9 /tests/playsaw.cpp | |
| parent | eaa0bd3db6233ef3992a4410e5855e0154383ac6 (diff) | |
Added getErrorText() function, other minor updates.
Diffstat (limited to 'tests/playsaw.cpp')
| -rw-r--r-- | tests/playsaw.cpp | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/tests/playsaw.cpp b/tests/playsaw.cpp index 9dea11b..c23163e 100644 --- a/tests/playsaw.cpp +++ b/tests/playsaw.cpp @@ -222,14 +222,19 @@ int main( int argc, char *argv[] ) // An error in the openStream() function can be detected either by // checking for a non-zero return value OR by a subsequent call to // isStreamOpen(). - if ( dac.openStream( &oParams, NULL, FORMAT, fs, &bufferFrames, &saw, (void *)data, &options ) ) + if ( dac.openStream( &oParams, NULL, FORMAT, fs, &bufferFrames, &saw, (void *)data, &options ) ) { + std::cout << dac.getErrorText() << std::endl; goto cleanup; + } if ( dac.isStreamOpen() == false ) goto cleanup; //std::cout << "Stream latency = " << dac.getStreamLatency() << "\n" << std::endl; // Stream is open ... now start it. - if ( dac.startStream() ) goto cleanup; + if ( dac.startStream() ) { + std::cout << dac.getErrorText() << std::endl; + goto cleanup; + } if ( checkCount ) { while ( dac.isStreamRunning() == true ) SLEEP( 100 ); |
