aaudio: fix problems with PlayerBase and ref counting
CTS test was crashing because of a multiple inheritance
problem involving PlayerBase.
We now implement separate PlayerBase class that sits between
AudioStream and the system.
Bug: 65450109
Test: CTS nativemedia/aaudio
Change-Id: I424663acc1eeacc9544769991495cb48f4110359
diff --git a/media/libaaudio/src/client/AudioStreamInternalPlay.h b/media/libaaudio/src/client/AudioStreamInternalPlay.h
index fdb1fd7..98783de 100644
--- a/media/libaaudio/src/client/AudioStreamInternalPlay.h
+++ b/media/libaaudio/src/client/AudioStreamInternalPlay.h
@@ -50,6 +50,9 @@
return AAUDIO_DIRECTION_OUTPUT;
}
+ // Only register client side streams.
+ bool needsSystemRegistration() override { return !mInService; }
+
protected:
aaudio_result_t requestPauseInternal();
@@ -58,6 +61,8 @@
void onFlushFromServer() override;
+ android::status_t doSetVolume() override;
+
/**
* Low level write that will not block. It will just write as much as it can.
*
@@ -80,6 +85,9 @@
int32_t numFrames);
int64_t mLastFramesRead = 0; // used to prevent retrograde motion
+
+ LinearRamp mVolumeRamp;
+
};
} /* namespace aaudio */