summaryrefslogtreecommitdiff
path: root/tests/playsaw.cpp
diff options
context:
space:
mode:
authorGary Scavone <gary@music.mcgill.ca>2019-08-22 12:30:50 -0400
committerGary Scavone <gary@music.mcgill.ca>2019-08-22 12:30:50 -0400
commite4b398ae9565d7680f5a2e8250a7d2d3fc9d4660 (patch)
tree09855c747458499cace5c458caee3fd91de3e20b /tests/playsaw.cpp
parentba23fd33d7cf5d372d487b5c8a91f569875a001c (diff)
Added errorCallback function argument to RtAudio constructor. Updated documentation and removed commented-out RtAudioError class. Updated playsaw.cpp to test errorCallback constructor argument.
Diffstat (limited to 'tests/playsaw.cpp')
-rw-r--r--tests/playsaw.cpp9
1 files changed, 5 insertions, 4 deletions
diff --git a/tests/playsaw.cpp b/tests/playsaw.cpp
index 56e693f..f678d1e 100644
--- a/tests/playsaw.cpp
+++ b/tests/playsaw.cpp
@@ -153,7 +153,9 @@ int main( int argc, char *argv[] )
// minimal command-line checking
if (argc < 3 || argc > 6 ) usage();
- RtAudio dac;
+ // Specify our own error callback function.
+ RtAudio dac( RtAudio::UNSPECIFIED, &errorCallback );
+
if ( dac.getDeviceCount() < 1 ) {
std::cout << "\nNo audio devices found!\n";
exit( 1 );
@@ -171,9 +173,8 @@ int main( int argc, char *argv[] )
double *data = (double *) calloc( channels, sizeof( double ) );
- // Specify our own error callback function and tell RtAudio to
- // output all messages, even warnings.
- dac.setErrorCallback( &errorCallback );
+ // Tell RtAudio to output all messages, even warnings.
+ //dac.setErrorCallback( &errorCallback ); // could use if not set via constructor
dac.showWarnings( true );
// Set our stream parameters for output only.