From 109ab70963f7a3cea33236901d00073502dd7438 Mon Sep 17 00:00:00 2001 From: Marcus Tomlinson Date: Fri, 20 Apr 2018 18:37:02 +0200 Subject: [PATCH] Move stream_.state update to the end of wasapiThread() --- RtAudio.cpp | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/RtAudio.cpp b/RtAudio.cpp index 36bebd4..18e900e 100644 --- a/RtAudio.cpp +++ b/RtAudio.cpp @@ -1,4 +1,4 @@ -/************************************************************************/ +/************************************************************************/ /*! \class RtAudio \brief Realtime audio i/o C++ classes. @@ -5366,13 +5366,11 @@ Exit: CoUninitialize(); + if ( !errorText_.empty() ) + error( errorType ); + // update stream state stream_.state = STREAM_STOPPED; - - if ( errorText_.empty() ) - return; - else - error( errorType ); } //******************** End of __WINDOWS_WASAPI__ *********************// -- 2.30.2