AudioFlinger: Extract inner Track classes
Finish removing inner Track classes from AudioFlinger.
Test: atest audiorecord_tests audiotrack_tests audiorouting_tests trackplayerbase_tests audiosystem_tests
Test: atest AudioTrackTest AudioRecordTest
Test: YouTube and Camera
Bug: 288339104
Bug: 288468076
Merged-In: Ib44c7eb854f9d447aa11223d76373b00c413a778
Change-Id: Ib44c7eb854f9d447aa11223d76373b00c413a778
(cherry picked from commit 8d31fd23b1f731911b291f8704bf697c4135ad9d)
diff --git a/services/audioflinger/AudioFlinger.cpp b/services/audioflinger/AudioFlinger.cpp
index 87bf81e..98f763e 100644
--- a/services/audioflinger/AudioFlinger.cpp
+++ b/services/audioflinger/AudioFlinger.cpp
@@ -2391,7 +2391,7 @@
CreateRecordInput input = VALUE_OR_RETURN_STATUS(CreateRecordInput::fromAidl(_input));
CreateRecordOutput output;
- sp<RecordThread::RecordTrack> recordTrack;
+ sp<IAfRecordTrack> recordTrack;
sp<Client> client;
status_t lStatus;
audio_session_t sessionId = input.sessionId;
@@ -3946,7 +3946,7 @@
// use an index mask here to create the PatchRecord.
inChannelMask = audio_channel_mask_out_to_in_index_mask(track->channelMask());
}
- sp patchRecord = new RecordThread::PatchRecord(nullptr /* thread */,
+ sp<IAfPatchRecord> patchRecord = IAfPatchRecord::create(nullptr /* thread */,
track->sampleRate(),
inChannelMask,
track->format(),
@@ -3966,7 +3966,7 @@
// for now, we exclude fast tracks by removing the Fast flag.
const audio_output_flags_t outputFlags =
(audio_output_flags_t)(track->getOutputFlags() & ~AUDIO_OUTPUT_FLAG_FAST);
- sp patchTrack = new PlaybackThread::PatchTrack(secondaryThread,
+ sp<IAfPatchTrack> patchTrack = IAfPatchTrack::create(secondaryThread,
track->streamType(),
track->sampleRate(),
track->channelMask(),