Browse Source

android rebuilt

[email protected] 8 years ago
parent
commit
df66e09703

+ 4 - 15
dependencies/openal-android/jni/OpenAL/Alc/opensles.c

@@ -316,7 +316,6 @@ SLresult alc_opensles_init_extradata(ALCdevice *pDevice)
 }
 
 static void start_playback(ALCdevice *pDevice) {
-    LOGV("start_playback 1");
     opesles_data_t *devState = NULL;
 	int i;
 
@@ -328,14 +327,12 @@ static void start_playback(ALCdevice *pDevice) {
         devState = (opesles_data_t *) pDevice->ExtraData;
     }
 
-    LOGV("start_playback 2");
 
     if (devState->threadShouldRun == 1) {
         // Gratuitous resume
         return;
     }
 
-    LOGV("start_playback 3");
     // start/restart playback thread
     devState->threadShouldRun = 1;
 
@@ -347,15 +344,10 @@ static void start_playback(ALCdevice *pDevice) {
     //pthread_attr_setschedparam(&playbackThreadAttr, &playbackThreadParam);
     pthread_create(&(devState->playbackThread), &playbackThreadAttr, playback_function,  (void *) pDevice);
 
-    LOGV("start_playback 4");
     while (devState->threadShouldRun && (0 == devState->threadIsReady))
     {
-        LOGV("start_playback ...");
-        usleep(100);
-        //sched_yield();
+        sched_yield();
     }
-
-    LOGV("start_playback 5");
 }
 
 static void stop_playback(ALCdevice *pDevice) {
@@ -428,27 +420,21 @@ SLresult alc_opensles_create_native_audio_engine()
     SLresult result;
 
     // create engine
-    LOGV("OpenSLES>> 1");
     result = slCreateEngine(&engineObject, 0, NULL, 0, NULL, NULL);
     assert(SL_RESULT_SUCCESS == result);
 
-    LOGV("OpenSLES>> 2");
     // realize the engine
     result = (*engineObject)->Realize(engineObject, SL_BOOLEAN_FALSE);
     assert(SL_RESULT_SUCCESS == result);
 
-    LOGV("OpenSLES>> 3");
     // get the engine interface, which is needed in order to create other objects
     result = (*engineObject)->GetInterface(engineObject, SL_IID_ENGINE, &engineEngine);
     assert(SL_RESULT_SUCCESS == result);
 
-    LOGV("OpenSLES>> 4");
     // create output mix
     result = (*engineEngine)->CreateOutputMix(engineEngine, &outputMixObject, 0, NULL, NULL);
     assert(SL_RESULT_SUCCESS == result);
 
-    LOGV("OpenSLES>> 5");
-
     // realize the output mix
     result = (*outputMixObject)->Realize(outputMixObject, SL_BOOLEAN_FALSE);
     assert(SL_RESULT_SUCCESS == result);
@@ -462,6 +448,9 @@ static ALCboolean opensles_open_playback(ALCdevice *pDevice, const ALCchar *devi
     LOGV("opensles_open_playback pDevice=%p, deviceName=%s", pDevice, deviceName);
 
     // Check if probe has linked the opensl symbols
+
+    alc_opensles_probe(DEVICE_PROBE);
+
     /*
     if (pslCreateEngine == NULL) {
         alc_opensles_probe(DEVICE_PROBE);

+ 3 - 1
dependencies/openal-android/jni/OpenAL/include/config.h

@@ -88,7 +88,7 @@
 /* #cmakedefine HAVE___INT64 */
 
 /* Define to the size of a long int type */
-#define SIZEOF_LONG 4
+
 
 /* Define to the size of a long long int type */
 #define SIZEOF_LONG_LONG 8
@@ -103,8 +103,10 @@
 #include <stdint.h>
 #if UINTPTR_MAX == 0xffffffff
 #define SIZEOF_VOIDP 4
+#define SIZEOF_LONG 4
 #elif UINTPTR_MAX == 0xffffffffffffffff
 #define SIZEOF_VOIDP 8
+#define SIZEOF_LONG 8
 #endif
 
 

BIN
dependencies/openal-android/obj/local/arm64-v8a/libopenal.a


BIN
dependencies/openal-android/obj/local/armeabi-v7a/libopenal.a


+ 2 - 2
examples/SoundDemo/proj.android/AndroidManifest.xml

@@ -1,6 +1,6 @@
 <?xml version="1.0" encoding="utf-8"?>
 <manifest xmlns:android="http://schemas.android.com/apk/res/android"
-      package="org.oxygine.Demo"
+      package="org.oxygine.SoundDemo"
       android:versionCode="1"
       android:versionName="1.0"
       android:installLocation="auto">
@@ -11,7 +11,7 @@
                  android:theme="@android:style/Theme.NoTitleBar.Fullscreen"
                  android:hardwareAccelerated="true" >
 
-        <activity android:name="org.oxygine.Demo.MainActivity"
+        <activity android:name="org.oxygine.SoundDemo.MainActivity"
                   android:label="@string/app_name"
                   android:theme="@android:style/Theme.NoTitleBar.Fullscreen"
                   android:configChanges="locale|orientation|keyboardHidden|screenSize" 

+ 1 - 1
examples/SoundDemo/proj.android/jni/Application.mk

@@ -2,4 +2,4 @@ APP_STL := gnustl_static
 APP_CPPFLAGS += -fexceptions
 APP_CPPFLAGS += -frtti
 APP_CPPFLAGS += -std=c++11
-APP_ABI := armeabi-v7a
+APP_ABI := armeabi-v7a arm64-v8a

+ 1 - 1
examples/SoundDemo/proj.android/res/values/strings.xml

@@ -1,4 +1,4 @@
 <?xml version="1.0" encoding="utf-8"?>
 <resources>
-    <string name="app_name">Demo</string>
+    <string name="app_name">SoundDemo</string>
 </resources>

+ 1 - 1
examples/SoundDemo/proj.android/src/org/oxygine/Demo/MainActivity.java → examples/SoundDemo/proj.android/src/org/oxygine/SoundDemo/MainActivity.java

@@ -1,4 +1,4 @@
-package org.oxygine.Demo;
+package org.oxygine.SoundDemo;
 
 import org.oxygine.lib.OxygineActivity;