aboutsummaryrefslogtreecommitdiff
path: root/src/aaudio/AAudioLoader.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/aaudio/AAudioLoader.h')
-rw-r--r--src/aaudio/AAudioLoader.h11
1 files changed, 8 insertions, 3 deletions
diff --git a/src/aaudio/AAudioLoader.h b/src/aaudio/AAudioLoader.h
index 6f5bb950..a07c5391 100644
--- a/src/aaudio/AAudioLoader.h
+++ b/src/aaudio/AAudioLoader.h
@@ -52,6 +52,12 @@ typedef int32_t aaudio_usage_t;
typedef int32_t aaudio_content_type_t;
typedef int32_t aaudio_input_preset_t;
typedef int32_t aaudio_session_id_t;
+
+// There are a few definitions used by Oboe.
+#define AAUDIO_OK static_cast<aaudio_result_t>(Result::OK)
+#define AAUDIO_ERROR_TIMEOUT static_cast<aaudio_result_t>(Result::ErrorTimeout)
+#define AAUDIO_STREAM_STATE_STARTING static_cast<aaudio_stream_state_t>(StreamState::Starting)
+#define AAUDIO_STREAM_STATE_STARTED static_cast<aaudio_stream_state_t>(StreamState::Started)
#else
#include <aaudio/AAudio.h>
#include <android/ndk-version.h>
@@ -63,7 +69,6 @@ typedef int32_t aaudio_session_id_t;
namespace oboe {
-
/**
* The AAudio API was not available in early versions of Android.
* To avoid linker errors, we dynamically link with the functions by name using dlsym().
@@ -133,6 +138,8 @@ class AAudioLoader {
*/
int open();
+ void *getLibHandle() const { return mLibHandle; }
+
// Function pointers into the AAudio shared library.
signature_I_PPB createStreamBuilder = nullptr;
@@ -167,8 +174,6 @@ class AAudioLoader {
signature_I_PSKPLPL stream_getTimestamp = nullptr;
- signature_B_PS stream_isMMapUsed = nullptr;
-
signature_I_PS stream_close = nullptr;
signature_I_PS stream_getChannelCount = nullptr;