mirror of http://www.pogo.org.uk/~mark/trx.git
Be more specific when setting buffer time
We don't want the max buffer time, but we want the nearest buffer time that is below the value provided by the user.master
parent
b7ac96036d
commit
591a498725
6
device.c
6
device.c
|
@ -62,9 +62,9 @@ int set_alsa_hw(snd_pcm_t *pcm,
|
|||
r = snd_pcm_hw_params_set_channels(pcm, hw, channels);
|
||||
CHK("snd_pcm_hw_params_set_channels", r);
|
||||
|
||||
dir = 0;
|
||||
r = snd_pcm_hw_params_set_buffer_time_max(pcm, hw, &buffer, &dir);
|
||||
CHK("snd_pcm_hw_params_set_buffer_time_max", r);
|
||||
dir = -1;
|
||||
r = snd_pcm_hw_params_set_buffer_time_near(pcm, hw, &buffer, &dir);
|
||||
CHK("snd_pcm_hw_params_set_buffer_time_near", r);
|
||||
|
||||
r = snd_pcm_hw_params(pcm, hw);
|
||||
CHK("hw_params", r);
|
||||
|
|
Loading…
Reference in New Issue