aaudio: return result of createMmapBuffer
Return result of createMmapBuffer in openWithFormat.
If the restult is not AAUDIO_OK, it will retry to open
with other formats.
Bug: 216659054
Test: OboeTester -> TEST INPUT
Change-Id: I6da2f09a9c6aa5c74bf8a3833c89148334960335
diff --git a/services/oboeservice/AAudioServiceEndpointMMAP.cpp b/services/oboeservice/AAudioServiceEndpointMMAP.cpp
index a266d5b..0d2c505 100644
--- a/services/oboeservice/AAudioServiceEndpointMMAP.cpp
+++ b/services/oboeservice/AAudioServiceEndpointMMAP.cpp
@@ -186,7 +186,8 @@
ALOGD("%s() deviceId = %d, sessionId = %d", __func__, getDeviceId(), getSessionId());
// Create MMAP/NOIRQ buffer.
- if (createMmapBuffer(&mAudioDataFileDescriptor) != AAUDIO_OK) {
+ result = createMmapBuffer(&mAudioDataFileDescriptor);
+ if (result != AAUDIO_OK) {
goto error;
}