Remove the (arbitary) restriction on buffer size
This commit is contained in:
parent
a04d869eaa
commit
b7d230150c
|
@ -1118,6 +1118,7 @@ unsafe fn set_hw_params_from_format(
|
||||||
}
|
}
|
||||||
|
|
||||||
// TODO: Review this. 200ms seems arbitrary...
|
// TODO: Review this. 200ms seems arbitrary...
|
||||||
|
/*
|
||||||
let mut max_buffer_size = format.sample_rate.0 as alsa::snd_pcm_uframes_t /
|
let mut max_buffer_size = format.sample_rate.0 as alsa::snd_pcm_uframes_t /
|
||||||
format.channels as alsa::snd_pcm_uframes_t /
|
format.channels as alsa::snd_pcm_uframes_t /
|
||||||
5; // 200ms of buffer
|
5; // 200ms of buffer
|
||||||
|
@ -1127,6 +1128,7 @@ unsafe fn set_hw_params_from_format(
|
||||||
{
|
{
|
||||||
return Err(format!("max buffer size could not be set: {}", e));
|
return Err(format!("max buffer size could not be set: {}", e));
|
||||||
}
|
}
|
||||||
|
*/
|
||||||
|
|
||||||
if let Err(e) = check_errors(alsa::snd_pcm_hw_params(pcm_handle, hw_params.0)) {
|
if let Err(e) = check_errors(alsa::snd_pcm_hw_params(pcm_handle, hw_params.0)) {
|
||||||
return Err(format!("hardware params could not be set: {}", e));
|
return Err(format!("hardware params could not be set: {}", e));
|
||||||
|
|
Loading…
Reference in New Issue