alsa: avoid SetApproximateSampleRate() excessive log messages when Pa_IsFormatSupported API method is used to test for supported sample rates and some of them are not supported by device

This commit is contained in:
dmitrykos 2010-09-20 16:23:30 +00:00
commit b6e9030f6f

View file

@ -2462,9 +2462,11 @@ static int SetApproximateSampleRate( snd_pcm_t *pcm, snd_pcm_hw_params_t *hwPara
dir = 1;
}
ENSURE_( snd_pcm_hw_params_set_rate( pcm, hwParams, approx, dir ), paUnanticipatedHostError );
if( snd_pcm_hw_params_set_rate( pcm, hwParams, approx, dir ) < 0)
result = paInvalidSampleRate;
end:
return result;
error: