Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add AAudioSample.puml #5

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
45 changes: 45 additions & 0 deletions AAudioSample.puml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
@startuml
'https://plantuml.com/sequence-diagram

hide footbox
autonumber


AAudioApi -> AAudioApi:native_init()
AAudioApi -> StreamEngine:start()
StreamEngine -> StreamEngine:openPlaybackStream()
StreamEngine -> StreamEngine :createPlaybackStream()
StreamEngine -> AAudio:AAudio_createStreamBuilder()
StreamEngine -> StreamEngine :setupPlaybackStreamParameters()
StreamEngine -> AAudio:AAudioStreamBuilder_setFormat()
StreamEngine -> AAudio:AAudioStreamBuilder_setChannelCount()
StreamEngine -> AAudio:AAudioStreamBuilder_setSampleRate()
StreamEngine -> AAudio:AAudioStreamBuilder_setErrorCallback()
note right:6~10 steps Sets the stream parameters
StreamEngine -> StreamEngine:errorCallback()
StreamEngine -> AAudio:AAudioStream_getState()
StreamEngine -> StreamEngine:restartStreams()
note right:If it fails, reconnect
StreamEngine -> StreamEngine:closePlaybackStream()
StreamEngine -> StreamEngine:openPlaybackStream()
StreamEngine -> AAudio:AAudioStreamBuilder_openStream()
StreamEngine -> AAudio:AAudioStream_getSampleRate()
StreamEngine -> AAudio:AAudioStream_getFramesPerBurst()
StreamEngine -> StreamEngine:warnIfNotLowLatency(AAudioStream)
StreamEngine -> AAudio:AAudioStream_setBufferSizeInFrames()
StreamEngine -> audio_common.h:PrintAudioStreamInfo(AAudioStream)
StreamEngine -> AAudio:AAudioStreamBuilder_delete()
StreamEngine -> StreamEngine:writeBufferToStreamer()
StreamEngine -> AAudio:AAudioStream_write()
AAudioApi -> StreamEngine:stop()
StreamEngine -> StreamEngine:closePlaybackStream()
StreamEngine -> AAudio:aaudio_stream_state_t
note right:Restore the aaudio_STREAM_STATE_t related state
StreamEngine -> AAudio:AAudioStream_requestStop()
StreamEngine -> AAudio:AAudioStream_waitForStateChange()
StreamEngine -> AAudio:AAudioStream=nullptr




@enduml