mirror of
https://gitlab.freedesktop.org/pulseaudio/pulseaudio.git
synced 2025-11-10 13:29:58 -05:00
sample.c: Allow module-loopback to exceed PA_RATE_MAX
The rate set by module loopback may exceed PA_RATE_MAX by 1%, therefore allow rates higher than PA_RATE_MAX in pa_sample_rate_valid().
This commit is contained in:
parent
f3265f944a
commit
a42241ec95
1 changed files with 4 additions and 1 deletions
|
|
@ -105,7 +105,10 @@ int pa_sample_format_valid(unsigned format) {
|
||||||
}
|
}
|
||||||
|
|
||||||
int pa_sample_rate_valid(uint32_t rate) {
|
int pa_sample_rate_valid(uint32_t rate) {
|
||||||
return rate > 0 && rate <= PA_RATE_MAX;
|
/* The extra 1% is due to module-loopback: it temporarily sets
|
||||||
|
* a higher-than-nominal rate to get rid of excessive buffer
|
||||||
|
* latency */
|
||||||
|
return rate > 0 && rate <= PA_RATE_MAX * 101 / 100;
|
||||||
}
|
}
|
||||||
|
|
||||||
int pa_channels_valid(uint8_t channels) {
|
int pa_channels_valid(uint8_t channels) {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue