diff options
| author | Gary Scavone <gary@music.mcgill.ca> | 2011-08-14 13:45:27 +0000 |
|---|---|---|
| committer | Stephen Sinclair <sinclair@music.mcgill.ca> | 2013-10-11 01:38:28 +0200 |
| commit | 692c1b860c5ccc43420263f12a4d6a46f987b8a6 (patch) | |
| tree | 88c00c9f9a223f44c1951ae19d2c68b31db0a94c | |
| parent | c32410a961a1e54c1626822f54703cec54cee343 (diff) | |
Final update for release 4.0.9, including DS bugfix in getDeviceCount (gs).
| -rw-r--r-- | RtAudio.cpp | 9 | ||||
| -rw-r--r-- | doc/doxygen/tutorial.txt | 2 | ||||
| -rw-r--r-- | doc/release.txt | 3 |
3 files changed, 9 insertions, 5 deletions
diff --git a/RtAudio.cpp b/RtAudio.cpp index ab50cbb..4a3966b 100644 --- a/RtAudio.cpp +++ b/RtAudio.cpp @@ -3661,9 +3661,12 @@ unsigned int RtApiDs :: getDeviceCount( void ) }
// Clean out any devices that may have disappeared.
- std::vector< DsDevice > :: iterator it;
- for ( it=dsDevices.begin(); it < dsDevices.end(); it++ )
- if ( it->found == false ) dsDevices.erase( it );
+ std::vector< int > indices;
+ for ( unsigned int i=0; i<dsDevices.size(); i++ )
+ if ( dsDevices[i].found == false ) indices.push_back( i );
+ for ( unsigned int nErased=0, unsigned int i=0; i<indices.size(); i++, nErased++ ) {
+ dsDevices.erase( dsDevices.begin()-nErased );
+ }
return dsDevices.size();
}
diff --git a/doc/doxygen/tutorial.txt b/doc/doxygen/tutorial.txt index 3ed7a9e..1066f41 100644 --- a/doc/doxygen/tutorial.txt +++ b/doc/doxygen/tutorial.txt @@ -32,7 +32,7 @@ Devices are now re-enumerated every time the RtAudio::getDeviceCount(), RtAudio: \section download Download -Latest Release (11 August 2011): <A href="http://www.music.mcgill.ca/~gary/rtaudio/release/rtaudio-4.0.9.tar.gz">Version 4.0.9</A> +Latest Release (14 August 2011): <A href="http://www.music.mcgill.ca/~gary/rtaudio/release/rtaudio-4.0.9.tar.gz">Version 4.0.9</A> \section documentation Documentation Links diff --git a/doc/release.txt b/doc/release.txt index c58c9d9..ebbc432 100644 --- a/doc/release.txt +++ b/doc/release.txt @@ -2,12 +2,13 @@ RtAudio - a set of C++ classes that provide a common API for realtime audio inpu By Gary P. Scavone, 2001-2011. -v4.0.9: (11 August 2011) +v4.0.9: (14 August 2011) - fix for ASIO problem enumerating devices after opening duplex stream (Oliver Larkin) - fix for OS-X problems setting sample rate and bits-per-sample - updates for OS-X "Lion" - updates for wide character support in Windows DS (UNICODE) - fix for possible ALSA callback thread hang (thanks to Tristan Matthews) +- fix for DS getDeviceCount bug (vector erase problem) v4.0.8: (12 April 2011) - fix for MinGW4 problem enumerating and setting sample rates (iasiothiscallresolver, Dmitry Kostjuchenko) |
