From 77bdb4557520ec1f1cb6da02e253bc10aae19fbb Mon Sep 17 00:00:00 2001 From: Gary Scavone Date: Tue, 6 Sep 2016 11:27:36 -0400 Subject: [PATCH] Bug fix in duplex.cpp --- projects/examples/duplex.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/projects/examples/duplex.cpp b/projects/examples/duplex.cpp index d7ffbb8..696dfd8 100644 --- a/projects/examples/duplex.cpp +++ b/projects/examples/duplex.cpp @@ -104,6 +104,7 @@ int main(int argc, char *argv[]) RtAudio::StreamOptions options; //options.flags |= RTAUDIO_NONINTERLEAVED; + bufferBytes = bufferFrames * channels * sizeof( MY_TYPE ); try { adac.openStream( &oParams, &iParams, FORMAT, fs, &bufferFrames, &inout, (void *)&bufferBytes, &options ); } @@ -112,7 +113,7 @@ int main(int argc, char *argv[]) exit( 1 ); } - bufferBytes = bufferFrames * channels * sizeof( MY_TYPE ); + // Test RtAudio functionality for reporting latency. std::cout << "\nStream latency = " << adac.getStreamLatency() << " frames" << std::endl;