cras_tests: commit buffer explicitly in record function

WRT the API change in CL:3062163, `buf.commit()` should be call
explicitly to complete and transmit data to backend after write.

BUG=b:228528506
TEST=deploy to DUT and test `cras_tests capture`

Change-Id: I3842545a21c46f2e78f70622aeca9a6d35f32ba2
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/adhd/+/3626973
Reviewed-by: Chih-Yang Hsia <paulhsia@chromium.org>
Tested-by: Chih-Yang Hsia <paulhsia@chromium.org>
Commit-Queue: Chih-Yang Hsia <paulhsia@chromium.org>
Reviewed-by: Li-Yu Yu <aaronyu@google.com>
1 file changed