Alsa: fix defaultHighLatency - sample rate has to be set following reset of hwParams.
This commit is contained in:
parent
ebd20865db
commit
ce083a09b7
1 changed files with 2 additions and 1 deletions
|
|
@ -921,8 +921,9 @@ static PaError GropeDevice( snd_pcm_t* pcm, int isPlug, StreamDirection mode, in
|
|||
*/
|
||||
ENSURE_( alsa_snd_pcm_hw_params_set_buffer_size_near( pcm, hwParams, &lowLatency ), paUnanticipatedHostError );
|
||||
|
||||
/* Have to reset hwParams, to set new buffer size */
|
||||
/* Have to reset hwParams, to set new buffer size; need to also set sample rate again */
|
||||
ENSURE_( alsa_snd_pcm_hw_params_any( pcm, hwParams ), paUnanticipatedHostError );
|
||||
ENSURE_( alsa_snd_pcm_hw_params_set_rate( pcm, hwParams, defaultSr, 0 ), paUnanticipatedHostError );
|
||||
ENSURE_( alsa_snd_pcm_hw_params_set_buffer_size_near( pcm, hwParams, &highLatency ), paUnanticipatedHostError );
|
||||
|
||||
*minChannels = (int)minChans;
|
||||
|
|
|
|||
Loading…
Reference in a new issue