Skip to content

Commit 4d37ac6

Browse files
committed
Fix AudioRecord parameter parsing to accept --record-seconds and --strict with values
Fixes #234 - Added --record-seconds as alias for --rec-secs parameter - Modified --strict to accept optional values (0 or 1) Signed-off-by: Teja Swaroop Moida <tmoida@qti.qualcomm.com>
1 parent f680543 commit 4d37ac6

1 file changed

Lines changed: 11 additions & 3 deletions

File tree

  • Runner/suites/Multimedia/Audio/AudioRecord

Runner/suites/Multimedia/Audio/AudioRecord/run.sh

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ while [ $# -gt 0 ]; do
8484
DURATIONS="$2"
8585
shift 2
8686
;;
87-
--rec-secs)
87+
--rec-secs|--record-seconds)
8888
REC_SECS="$2"
8989
shift 2
9090
;;
@@ -97,8 +97,16 @@ while [ $# -gt 0 ]; do
9797
shift 2
9898
;;
9999
--strict)
100-
STRICT=1
101-
shift
100+
case "$2" in
101+
--*|"")
102+
STRICT=1
103+
shift
104+
;;
105+
*)
106+
STRICT="$2"
107+
shift 2
108+
;;
109+
esac
102110
;;
103111
--no-dmesg)
104112
DMESG_SCAN=0

0 commit comments

Comments
 (0)