OboeAudioService: add thread to service for passing timestamps
Cleanup several TODOs.
Test: test_aaudio in CTS
Change-Id: I7fc956b6a21cbb592f98e1e5a8f43ebd6926d796
Signed-off-by: Phil Burk <philburk@google.com>
diff --git a/services/oboeservice/OboeServiceStreamBase.cpp b/services/oboeservice/OboeServiceStreamBase.cpp
index 6b7e4e5..15b70a5 100644
--- a/services/oboeservice/OboeServiceStreamBase.cpp
+++ b/services/oboeservice/OboeServiceStreamBase.cpp
@@ -40,12 +40,15 @@
}
OboeServiceStreamBase::~OboeServiceStreamBase() {
+ Mutex::Autolock _l(mLockUpMessageQueue);
delete mUpMessageQueue;
}
void OboeServiceStreamBase::sendServiceEvent(oboe_service_event_t event,
int32_t data1,
int64_t data2) {
+
+ Mutex::Autolock _l(mLockUpMessageQueue);
OboeServiceMessage command;
command.what = OboeServiceMessage::code::EVENT;
command.event.event = event;