Cleanup rtc::TaskQueue in AsyncAudioProcessing

use TaskQueueBase directly - rtc::TaskQueue wrapper adds no benefit here.

Bug: webrtc:14169
Change-Id: If3d4feb11ffa507919a8ce4d7545172a25f0aa86
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/335322
Reviewed-by: Tomas Gunnarsson <tommi@webrtc.org>
Auto-Submit: Danil Chapovalov <danilchap@webrtc.org>
Commit-Queue: Tomas Gunnarsson <tommi@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#41809}
diff --git a/modules/async_audio_processing/BUILD.gn b/modules/async_audio_processing/BUILD.gn
index 7a7ca20..0a8fc58 100644
--- a/modules/async_audio_processing/BUILD.gn
+++ b/modules/async_audio_processing/BUILD.gn
@@ -24,7 +24,6 @@
     "../../api/task_queue:task_queue",
     "../../rtc_base:checks",
     "../../rtc_base:refcount",
-    "../../rtc_base:rtc_task_queue",
   ]
 }
 
diff --git a/modules/async_audio_processing/async_audio_processing.cc b/modules/async_audio_processing/async_audio_processing.cc
index 19c08dc..d61b126 100644
--- a/modules/async_audio_processing/async_audio_processing.cc
+++ b/modules/async_audio_processing/async_audio_processing.cc
@@ -63,7 +63,7 @@
           "AsyncAudioProcessing",
           TaskQueueFactory::Priority::NORMAL)) {
   frame_processor_.SetSink([this](std::unique_ptr<AudioFrame> frame) {
-    task_queue_.PostTask([this, frame = std::move(frame)]() mutable {
+    task_queue_->PostTask([this, frame = std::move(frame)]() mutable {
       on_frame_processed_callback_(std::move(frame));
     });
   });
@@ -80,7 +80,7 @@
           "AsyncAudioProcessing",
           TaskQueueFactory::Priority::NORMAL)) {
   owned_frame_processor_->SetSink([this](std::unique_ptr<AudioFrame> frame) {
-    task_queue_.PostTask([this, frame = std::move(frame)]() mutable {
+    task_queue_->PostTask([this, frame = std::move(frame)]() mutable {
       on_frame_processed_callback_(std::move(frame));
     });
   });
@@ -88,11 +88,11 @@
 
 void AsyncAudioProcessing::Process(std::unique_ptr<AudioFrame> frame) {
   if (owned_frame_processor_) {
-    task_queue_.PostTask([this, frame = std::move(frame)]() mutable {
+    task_queue_->PostTask([this, frame = std::move(frame)]() mutable {
       owned_frame_processor_->Process(std::move(frame));
     });
   } else {
-    task_queue_.PostTask([this, frame = std::move(frame)]() mutable {
+    task_queue_->PostTask([this, frame = std::move(frame)]() mutable {
       frame_processor_.Process(std::move(frame));
     });
   }
diff --git a/modules/async_audio_processing/async_audio_processing.h b/modules/async_audio_processing/async_audio_processing.h
index f3ed969..2e78e71 100644
--- a/modules/async_audio_processing/async_audio_processing.h
+++ b/modules/async_audio_processing/async_audio_processing.h
@@ -14,8 +14,8 @@
 #include <memory>
 
 #include "api/audio/audio_frame_processor.h"
+#include "api/task_queue/task_queue_base.h"
 #include "rtc_base/ref_count.h"
-#include "rtc_base/task_queue.h"
 
 namespace webrtc {
 
@@ -101,7 +101,7 @@
   //   called.
   AudioFrameProcessor& frame_processor_;
   std::unique_ptr<AudioFrameProcessor> owned_frame_processor_;
-  rtc::TaskQueue task_queue_;
+  std::unique_ptr<TaskQueueBase, TaskQueueDeleter> task_queue_;
 };
 
 }  // namespace webrtc