libaaudio: remove LEGACY sharing mode
It was a poor API. Choosing the AudioTrack path is not a sharing mode.
Instead we decide internally, which path to choose based on sharing
mode and availability.
Test: CTS nativemedia/aaudio/test_aaudio.cpp
Change-Id: I8b6246b95cea807dcd0fc82e08a16f68f17b47f3
Signed-off-by: Phil Burk <philburk@google.com>
diff --git a/media/libaaudio/include/aaudio/AAudioDefinitions.h b/media/libaaudio/include/aaudio/AAudioDefinitions.h
index 979b8c9..5b72b94 100644
--- a/media/libaaudio/include/aaudio/AAudioDefinitions.h
+++ b/media/libaaudio/include/aaudio/AAudioDefinitions.h
@@ -124,14 +124,8 @@
AAUDIO_STREAM_STATE_CLOSED,
} aaudio_stream_state_t;
-// TODO review API
typedef enum {
/**
- * This will use an AudioTrack object for playing audio
- * and an AudioRecord for recording data.
- */
- AAUDIO_SHARING_MODE_LEGACY,
- /**
* This will be the only stream using a particular source or sink.
* This mode will provide the lowest possible latency.
* You should close EXCLUSIVE streams immediately when you are not using them.
@@ -142,12 +136,7 @@
* This will have higher latency than the EXCLUSIVE mode.
*/
AAUDIO_SHARING_MODE_SHARED,
- /**
- * Multiple applications will do their own mixing into a memory mapped buffer.
- * It may be possible for malicious applications to read the data produced by
- * other apps. So do not use this for private data such as telephony or messaging.
- */
- AAUDIO_SHARING_MODE_PUBLIC_MIX,
+
AAUDIO_SHARING_MODE_COUNT // This should always be last.
} aaudio_sharing_mode_t;