AudioFlinger: Add ThreadBase and PlaybackThread interfaces

ThreadBase::standby() check renamed ThreadBase::inStandby() to avoid future
confusion with an active method.

Test: atest audiorecord_tests audiotrack_tests audiorouting_tests trackplayerbase_tests audiosystem_tests
Test: atest AudioTrackTest AudioRecordTest
Test: YouTube Camera
Bug: 288339104
Bug: 289233517
Change-Id: Ied45a5d762b5a53c9d5dcd88d26efaa8b058836d
diff --git a/services/audioflinger/Tracks.cpp b/services/audioflinger/Tracks.cpp
index b2ec9df..9ca23fb 100644
--- a/services/audioflinger/Tracks.cpp
+++ b/services/audioflinger/Tracks.cpp
@@ -2195,7 +2195,7 @@
 {
     if (!mActive && frames != 0) {
         sp<AudioFlinger::ThreadBase> thread = mThread.promote();
-        if (thread != nullptr && thread->standby()) {
+        if (thread != nullptr && thread->inStandby()) {
             // preload one silent buffer to trigger mixer on start()
             ClientProxy::Buffer buf { .mFrameCount = mClientProxy->getStartThresholdInFrames() };
             status_t status = mClientProxy->obtainBuffer(&buf);
@@ -2303,7 +2303,7 @@
     // If we could not write all frames, allocate a buffer and queue it for next time.
     if (inBuffer.frameCount) {
         sp<AudioFlinger::ThreadBase> thread = mThread.promote();
-        if (thread != 0 && !thread->standby()) {
+        if (thread != nullptr && !thread->inStandby()) {
             queueBuffer(inBuffer);
         }
     }