speaker-test: allow large buffer and period time setup - up to 100 seconds

BugLink: https://github.com/alsa-project/alsa-utils/issues/224
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
This commit is contained in:
Jaroslav Kysela 2023-08-13 19:19:53 +02:00
parent 096920264e
commit c41f3cfb2f

View file

@ -1063,11 +1063,11 @@ int main(int argc, char *argv[]) {
break; break;
case 'b': case 'b':
buffer_time = atoi(optarg); buffer_time = atoi(optarg);
buffer_time = buffer_time > 1000000 ? 1000000 : buffer_time; buffer_time = buffer_time > 100000000 ? 100000000 : buffer_time;
break; break;
case 'p': case 'p':
period_time = atoi(optarg); period_time = atoi(optarg);
period_time = period_time > 1000000 ? 1000000 : period_time; period_time = period_time > 100000000 ? 100000000 : period_time;
break; break;
case 'P': case 'P':
nperiods = atoi(optarg); nperiods = atoi(optarg);