Support all sample rates for WASAPI
authorMarcus Tomlinson <themarcustomlinson@gmail.com>
Fri, 18 Apr 2014 14:03:11 +0000 (16:03 +0200)
committerMarcus Tomlinson <themarcustomlinson@gmail.com>
Fri, 18 Apr 2014 14:03:11 +0000 (16:03 +0200)
RtAudio.cpp

index 44cf4edb497d3743594f56a349693a6e1f83a23f..43aaaa36acd7a617f2a0c736fffb056a127c7c50 100644 (file)
@@ -4096,18 +4096,9 @@ RtAudio::DeviceInfo RtApiWasapi::getDeviceInfo( unsigned int device )
   // sample rates\r
   info.sampleRates.clear();\r
 \r
-  // allow support for sample rates that are multiples of the base rate\r
+  // allow support for all sample rates as we have a built-in sample rate converter\r
   for ( unsigned int i = 0; i < MAX_SAMPLE_RATES; i++ ) {\r
-    if ( SAMPLE_RATES[i] < deviceFormat->nSamplesPerSec ) {\r
-      if ( deviceFormat->nSamplesPerSec % SAMPLE_RATES[i] == 0 ) {\r
-        info.sampleRates.push_back( SAMPLE_RATES[i] );\r
-      }\r
-    }\r
-    else {\r
-      if ( SAMPLE_RATES[i] % deviceFormat->nSamplesPerSec == 0 ) {\r
-        info.sampleRates.push_back( SAMPLE_RATES[i] );\r
-      }\r
-    }\r
+    info.sampleRates.push_back( SAMPLE_RATES[i] );\r
   }\r
 \r
   // native format\r