Browse Source

Support all sample rates for WASAPI

tags/4.1.1
Marcus Tomlinson 11 years ago
parent
commit
27d53f8096
1 changed files with 2 additions and 11 deletions
  1. +2
    -11
      RtAudio.cpp

+ 2
- 11
RtAudio.cpp View File

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


Loading…
Cancel
Save