1digraph paused {
2initial [label="INITIAL\n\
3mIgnoreNextPausedInt = false\n\
4mPaused = false\n\
5mPausedInt = false"];
6
7resume_body [label="mIgnoreNextPausedInt = true\nif (mPaused || mPausedInt)"];
8resume_paused [label="mPaused = false\nmPausedInt = false\nsignal()"];
9resume_paused -> resume_merged;
10resume_merged [label="return"];
11
12Application -> ATstop;
13ATstop [label="AudioTrack::stop()"];
14ATstop -> pause;
15Application -> ATpause;
16ATpause [label="AudioTrack::pause()"];
17ATpause -> pause;
18ATstart -> resume;
19ATstart [label="AudioTrack::start()"];
20destructor [label="~AudioTrack()"];
21destructor -> requestExit;
22requestExit [label="AudioTrackThread::requestExit()"];
23requestExit -> resume;
24Application -> ATsetMarkerPosition
25ATsetMarkerPosition [label="AudioTrack::setMarkerPosition()\n[sets marker variables]"];
26ATsetMarkerPosition -> ATTwake
27Application -> ATsetPositionUpdatePeriod
28ATsetPositionUpdatePeriod [label="AudioTrack::setPositionUpdatePeriod()\n[sets update period variables]"];
29ATsetPositionUpdatePeriod -> ATTwake
30Application -> ATstart;
31
32resume [label="AudioTrackThread::resume()"];
33resume -> resume_body;
34
35resume_body -> resume_paused [label="true"];
36resume_body -> resume_merged [label="false"];
37
38ATTwake [label="AudioTrackThread::wake()\nif (!mPaused && mPausedInt && mPausedNs > 0)"];
39ATTwake-> ATTWake_wakeable [label="true"];
40ATTWake_wakeable [label="mIgnoreNextPausedInt = true\nmPausedInt = false\nsignal()"];
41ATTwake-> ATTWake_cannotwake [label="false"]
42ATTWake_cannotwake [label="ignore"];
43
44pause [label="mPaused = true"];
45pause -> return;
46
47threadLoop [label="AudioTrackThread::threadLoop()\nENTRY"];
48threadLoop -> threadLoop_1;
49threadLoop_1 [label="if (mPaused)"];
50threadLoop_1 -> threadLoop_1_true [label="true"];
51threadLoop_1 -> threadLoop_2 [label="false"];
52threadLoop_1_true [label="wait()\nreturn true"];
53threadLoop_2 [label="if (mIgnoreNextPausedInt)"];
54threadLoop_2 -> threadLoop_2_true [label="true"];
55threadLoop_2 -> threadLoop_3 [label="false"];
56threadLoop_2_true [label="mIgnoreNextPausedInt = false\nmPausedInt = false"];
57threadLoop_2_true -> threadLoop_3;
58threadLoop_3 [label="if (mPausedInt)"];
59threadLoop_3 -> threadLoop_3_true [label="true"];
60threadLoop_3 -> threadLoop_4 [label="false"];
61threadLoop_3_true [label="wait()\nmPausedInt = false\nreturn true"];
62threadLoop_4 [label="if (exitPending)"];
63threadLoop_4 -> threadLoop_4_true [label="true"];
64threadLoop_4 -> threadLoop_5 [label="false"];
65threadLoop_4_true [label="return false"];
66threadLoop_5 [label="ns = processAudioBuffer()"];
67threadLoop_5 -> threadLoop_6;
68threadLoop_6 [label="case ns"];
69threadLoop_6 -> threadLoop_6_0 [label="0"];
70threadLoop_6 -> threadLoop_6_NS_INACTIVE [label="NS_INACTIVE"];
71threadLoop_6 -> threadLoop_6_NS_NEVER [label="NS_NEVER"];
72threadLoop_6 -> threadLoop_6_NS_WHENEVER [label="NS_WHENEVER"];
73threadLoop_6 -> threadLoop_6_default [label="default"];
74threadLoop_6_default [label="if (ns < 0)"];
75threadLoop_6_default -> threadLoop_6_default_true [label="true"];
76threadLoop_6_default -> threadLoop_6_default_false [label="false"];
77threadLoop_6_default_true [label="FATAL"];
78threadLoop_6_default_false [label="pauseInternal(ns) [wake()-able]\nmPausedInternal = true\nmPausedNs = ns\nreturn true"];
79threadLoop_6_0 [label="return true"];
80threadLoop_6_NS_INACTIVE [label="pauseInternal()\nmPausedInternal = true\nmPausedNs = 0\nreturn true"];
81threadLoop_6_NS_NEVER [label="return false"];
82threadLoop_6_NS_WHENEVER [label="ns = 1s"];
83threadLoop_6_NS_WHENEVER -> threadLoop_6_default_false;
84
85}
86