Skip to content

Commit

Permalink
Add AAudioStreamWrapper
Browse files Browse the repository at this point in the history
This CL moves all AAudio API calls into a wrapper class. This should
make it easier to reason about AAudioOutputStream by hiding away
details behind a simple interface. Notably, AAudioOutputStream no
longer needs to know the nuances of the destruction logic.

There are a few opportunistically attempts to  to simplify some logic
in this CL. The most notable is that we clear the AudioSourceCallback*
immediately before requesting the AAudioStream's stop, instead of
immediately after.

The AAudioStreamWrapper will be re-used to add input support in a follow
up CL.

Bug: 1439668
Change-Id: I97f70871da61dac1757491ce8ac9236bda13576b
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4547118
Reviewed-by: Dale Curtis <dalecurtis@chromium.org>
Commit-Queue: Thomas Guilbert <tguilbert@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1146805}
  • Loading branch information
tguilbert-google authored and Chromium LUCI CQ committed May 20, 2023
1 parent d13a1a7 commit 4bbfd60
Show file tree
Hide file tree
Showing 5 changed files with 476 additions and 265 deletions.
2 changes: 2 additions & 0 deletions media/audio/BUILD.gn
Expand Up @@ -248,6 +248,8 @@ source_set("audio") {
sources += [
"android/aaudio_output.cc",
"android/aaudio_output.h",
"android/aaudio_stream_wrapper.cc",
"android/aaudio_stream_wrapper.h",
"android/audio_manager_android.cc",
"android/audio_manager_android.h",
"android/audio_track_output_stream.cc",
Expand Down

0 comments on commit 4bbfd60

Please sign in to comment.