diff options
author | Andreas Pehrson <[email protected]> | 2024-06-13 20:37:00 +0200 |
---|---|---|
committer | Andreas Pehrson <[email protected]> | 2024-07-04 22:16:18 +0200 |
commit | 4f27c5c382d2fea328daf247a50c517728c18448 (patch) | |
tree | ddc289961e0190a8a38013f7a48bb3574c3e282c | |
parent | 714ab57f8f86b19beb98618cc9036b23477488bb (diff) | |
download | cubeb-4f27c5c382d2fea328daf247a50c517728c18448.tar.gz cubeb-4f27c5c382d2fea328daf247a50c517728c18448.zip |
Mark functions in android headers inline
Also add an include to not depend on it being included externally.
-rw-r--r-- | src/android/cubeb-output-latency.h | 8 | ||||
-rw-r--r-- | src/android/cubeb_media_library.h | 6 | ||||
-rw-r--r-- | src/cubeb-jni-instances.h | 6 |
3 files changed, 11 insertions, 9 deletions
diff --git a/src/android/cubeb-output-latency.h b/src/android/cubeb-output-latency.h index 403276a..70dec8d 100644 --- a/src/android/cubeb-output-latency.h +++ b/src/android/cubeb-output-latency.h @@ -15,7 +15,7 @@ typedef struct output_latency_function output_latency_function; const int ANDROID_JELLY_BEAN_MR1_4_2 = 17; -output_latency_function * +inline output_latency_function * cubeb_output_latency_load_method(int version) { output_latency_function * ol = NULL; @@ -32,7 +32,7 @@ cubeb_output_latency_load_method(int version) return ol; } -bool +inline bool cubeb_output_latency_method_is_loaded(output_latency_function * ol) { assert(ol); @@ -43,7 +43,7 @@ cubeb_output_latency_method_is_loaded(output_latency_function * ol) return !!ol->from_lib; } -void +inline void cubeb_output_latency_unload_method(output_latency_function * ol) { if (!ol) { @@ -63,7 +63,7 @@ cubeb_output_latency_unload_method(output_latency_function * ol) extern "C" { -uint32_t +inline uint32_t cubeb_get_output_latency(output_latency_function * ol) { assert(cubeb_output_latency_method_is_loaded(ol)); diff --git a/src/android/cubeb_media_library.h b/src/android/cubeb_media_library.h index a54427b..4c02389 100644 --- a/src/android/cubeb_media_library.h +++ b/src/android/cubeb_media_library.h @@ -14,7 +14,7 @@ struct media_lib { typedef struct media_lib media_lib; -media_lib * +inline media_lib * cubeb_load_media_library() { media_lib ml = {}; @@ -46,7 +46,7 @@ cubeb_load_media_library() return rv; } -void +inline void cubeb_close_media_library(media_lib * ml) { dlclose(ml->libmedia); @@ -55,7 +55,7 @@ cubeb_close_media_library(media_lib * ml) free(ml); } -uint32_t +inline uint32_t cubeb_get_output_latency_from_media_library(media_lib * ml) { uint32_t latency = 0; diff --git a/src/cubeb-jni-instances.h b/src/cubeb-jni-instances.h index 4fed046..7670fcf 100644 --- a/src/cubeb-jni-instances.h +++ b/src/cubeb-jni-instances.h @@ -1,6 +1,8 @@ #ifndef _CUBEB_JNI_INSTANCES_H_ #define _CUBEB_JNI_INSTANCES_H_ +#include <jni.h> + /* * The methods in this file offer a way to pass in the required * JNI instances in the cubeb library. By default they return NULL. @@ -15,13 +17,13 @@ * and application's Context object. * */ -JNIEnv * +inline JNIEnv * cubeb_get_jni_env_for_thread() { return nullptr; } -jobject +inline jobject cubeb_jni_get_context_instance() { return nullptr; |