mirror of
https://github.com/alsa-project/alsa-lib.git
synced 2025-10-29 05:40:25 -04:00
fixed -b option to accept the buffer time in us.
This commit is contained in:
parent
cebc5c9bef
commit
46b3cc1612
1 changed files with 4 additions and 4 deletions
|
|
@ -563,7 +563,7 @@ Usage: latency [OPTION]... [FILE]...
|
|||
-r,--rate stream rate in Hz
|
||||
-c,--channels count of channels in stream
|
||||
-f,--frequency sine wave frequency in Hz
|
||||
-b,--buffer ring buffer size in samples
|
||||
-b,--buffer ring buffer size in us
|
||||
-p,--period period size in us
|
||||
-m,--method transfer method
|
||||
|
||||
|
|
@ -635,9 +635,9 @@ int main(int argc, char *argv[])
|
|||
freq = freq > 5000 ? 5000 : freq;
|
||||
break;
|
||||
case 'b':
|
||||
buffer_size = atoi(optarg);
|
||||
buffer_size = buffer_size < 64 ? 64 : buffer_size;
|
||||
buffer_size = buffer_size > 64*1024 ? 64*1024 : buffer_size;
|
||||
buffer_time = atoi(optarg);
|
||||
buffer_time = buffer_time < 1000 ? 1000 : buffer_time;
|
||||
buffer_time = buffer_time > 1000000 ? 1000000 : buffer_time;
|
||||
break;
|
||||
case 'p':
|
||||
period_time = atoi(optarg);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue