From: Marcus Tomlinson Date: Fri, 20 Apr 2018 16:37:02 +0000 (+0200) Subject: Move stream_.state update to the end of wasapiThread() X-Git-Url: https://main.carlh.net/gitweb/?p=rtaudio-cdist.git;a=commitdiff_plain;h=109ab70963f7a3cea33236901d00073502dd7438 Move stream_.state update to the end of wasapiThread() --- 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__ *********************//