CRAS: libcras: Add logic to handle buffer_offset

Updates rust libcras to find buffers using the buffer_offset field
rather than assuming they have the previously standard locations
of [0, used_size) and [used_size, 2 * used_size).

Add a function to set the buffer_offsets.

BUG=chromium:968724
TEST=playback test

Change-Id: I8780831f35d0c07426369e26f7ba6e4a7155df9b
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/adhd/+/1737128
Reviewed-by: Chih-Yang Hsia <paulhsia@chromium.org>
Tested-by: Fletcher Woodruff <fletcherw@chromium.org>
Commit-Queue: Fletcher Woodruff <fletcherw@chromium.org>
2 files changed