}\r
\r
// Clean out any devices that may have disappeared.\r
- std::vector< DsDevice > :: iterator it;\r
- for ( it=dsDevices.begin(); it < dsDevices.end(); it++ )\r
- if ( it->found == false ) dsDevices.erase( it );\r
+ std::vector< int > indices;\r
+ for ( unsigned int i=0; i<dsDevices.size(); i++ )\r
+ if ( dsDevices[i].found == false ) indices.push_back( i );\r
+ for ( unsigned int nErased=0, unsigned int i=0; i<indices.size(); i++, nErased++ ) {\r
+ dsDevices.erase( dsDevices.begin()-nErased );\r
+ }\r
\r
return dsDevices.size();\r
}\r
\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
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)