opensles: Fix build with Android API level < 14
authorArun Raghavan <git@arunraghavan.net>
Fri, 12 Jun 2015 12:38:44 +0000 (18:08 +0530)
committerArun Raghavan <git@arunraghavan.net>
Sat, 13 Jun 2015 10:33:58 +0000 (16:03 +0530)
Headers were broken on older Android versions, apparently.

https://bugzilla.gnome.org/show_bug.cgi?id=744459

sys/opensles/openslescommon.c
sys/opensles/openslescommon.h

index 3f4c89e..7dc4bb8 100644 (file)
 
 #include "openslescommon.h"
 
+#ifndef SL_ANDROID_RECORDING_PRESET_VOICE_COMMUNICATION
+/* This was added in Android API level 14 */
+#define SL_ANDROID_RECORDING_PRESET_VOICE_COMMUNICATION ((SLuint32) 0x00000004)
+#endif
+
 GType
 gst_opensles_recording_preset_get_type (void)
 {
index 181442b..2b619eb 100644 (file)
@@ -25,6 +25,8 @@
 
 #include <SLES/OpenSLES.h>
 #include <SLES/OpenSLES_Android.h>
+/* This is needed explicitly for API level < 14 */
+#include <SLES/OpenSLES_AndroidConfiguration.h>
 
 G_BEGIN_DECLS