AudioFlinger: Extract inner TrackHandle and RecordHandle classes
Test: atest audiorecord_tests audiotrack_tests audiorouting_tests trackplayerbase_tests audiosystem_tests
Test: atest AudioTrackTest AudioRecordTest
Test: YouTube, Camera
Bug: 288339104
Bug: 288468076
Change-Id: Ifc76e2aa4b6df801595d3ecc6b173dbc81cb9e3f
diff --git a/services/audioflinger/PlaybackTracks.h b/services/audioflinger/PlaybackTracks.h
index 7e36d5f..ffb7ac8 100644
--- a/services/audioflinger/PlaybackTracks.h
+++ b/services/audioflinger/PlaybackTracks.h
@@ -62,6 +62,13 @@
// playback track
class Track : public TrackBase, public VolumeProvider {
public:
+ // createIAudioTrackAdapter() is a static constructor which creates an
+ // IAudioTrack AIDL interface adapter from the Track object that
+ // may be passed back to the client (if needed).
+ //
+ // Only one AIDL IAudioTrack interface wrapper should be created per Track.
+ static sp<media::IAudioTrack> createIAudioTrackAdapter(const sp<Track>& track);
+
Track( PlaybackThread *thread,
const sp<Client>& client,
audio_stream_type_t streamType,