Fix Android suspend/resume support
parent
bfb1c2ec84
commit
061ef18e80
|
@ -10,29 +10,39 @@ LOCAL_ARM_MODE := arm
|
|||
LOCAL_CFLAGS += -I$(OPENAL_DIR) \
|
||||
-I$(OPENAL_DIR)/include \
|
||||
-I$(OPENAL_DIR)/OpenAL32/Include \
|
||||
-DAL_BUILD_LIBRARY \
|
||||
-DAL_ALEXT_PROTOTYPES \
|
||||
-DANDROID \
|
||||
-fpic \
|
||||
-shared -Wl,-Bsymbolic \
|
||||
-fpic \
|
||||
-ffunction-sections \
|
||||
-funwind-tables \
|
||||
-fstack-protector \
|
||||
-fno-short-enums \
|
||||
-D__ARM_ARCH_5__ \
|
||||
-D__ANDROID__ \
|
||||
-march=armv5 \
|
||||
-msoft-float \
|
||||
-DHAVE_GCC_VISIBILITY \
|
||||
-g \
|
||||
|
||||
# -fpic \
|
||||
# -ffunction-sections \
|
||||
# -funwind-tables \
|
||||
# -fstack-protector \
|
||||
# -fno-short-enums \
|
||||
# -D__ARM_ARCH_5__ \
|
||||
# -D__ANDROID__ \
|
||||
# -march=armv5 \
|
||||
# -msoft-float \
|
||||
|
||||
|
||||
# -DVERDE_USE_REAL_FILE_IO \
|
||||
|
||||
# FIXME
|
||||
LOCAL_CFLAGS += -I/Developer/AndroidNDK/platforms/android-8/arch-arm/usr/include
|
||||
#LOCAL_CFLAGS += -I/Developer/AndroidNDK/platforms/android-8/arch-arm/usr/include
|
||||
|
||||
# Default to Fixed-point math
|
||||
LOCAL_CFLAGS += -DOPENAL_FIXED_POINT -DOPENAL_FIXED_POINT_SHIFT=16
|
||||
|
||||
LOCAL_SRC_FILES := $(OPENAL_DIR)/OpenAL32/alAuxEffectSlot.c \
|
||||
LOCAL_SRC_FILES := \
|
||||
$(OPENAL_DIR)/Alc/android.c \
|
||||
$(OPENAL_DIR)/OpenAL32/alAuxEffectSlot.c \
|
||||
$(OPENAL_DIR)/OpenAL32/alBuffer.c \
|
||||
$(OPENAL_DIR)/OpenAL32/alDatabuffer.c \
|
||||
$(OPENAL_DIR)/OpenAL32/alEffect.c \
|
||||
|
|
|
@ -0,0 +1,13 @@
|
|||
#ifdef ANDROID
|
||||
#include <jni.h>
|
||||
#include "alMain.h"
|
||||
#include "apportable_openal_funcs.h"
|
||||
|
||||
jint JNI_OnLoad(JavaVM *vm, void *reserved) {
|
||||
BackendFuncs func_list;
|
||||
alc_audiotrack_init(&func_list);
|
||||
apportableOpenALFuncs.alc_android_set_java_vm(vm);
|
||||
return JNI_VERSION_1_4;
|
||||
}
|
||||
|
||||
#endif
|
|
@ -33,8 +33,6 @@
|
|||
#include "alAuxEffectSlot.h"
|
||||
|
||||
#ifdef ANDROID
|
||||
//#include <verde/verde_helpers.h>
|
||||
|
||||
// Apportable: Defines a cap on the maximum number of playing sources
|
||||
extern int alc_max_sources;
|
||||
extern int alc_active_sources;
|
||||
|
|
|
@ -270,6 +270,14 @@ typedef void (ALC_APIENTRY *LPALCCAPTURESAMPLES)( ALCdevice *device, A
|
|||
#pragma export off
|
||||
#endif
|
||||
|
||||
#if defined(ANDROID)
|
||||
/*
|
||||
* OpenAL extension for suspend/resume of audio throughout application lifecycle
|
||||
*/
|
||||
ALC_API void ALC_APIENTRY alcSuspend( void );
|
||||
ALC_API void ALC_APIENTRY alcResume( void );
|
||||
#endif
|
||||
|
||||
#if defined(__cplusplus)
|
||||
}
|
||||
#endif
|
||||
|
|
|
@ -4,6 +4,8 @@
|
|||
/* Define to the library version */
|
||||
#define ALSOFT_VERSION "1.12.854"
|
||||
|
||||
#define AL_BUILD_LIBRARY
|
||||
|
||||
/* Define if we have the Android backend */
|
||||
#if defined(ANDROID)
|
||||
#if defined(POST_FROYO)
|
||||
|
|
Binary file not shown.
Binary file not shown.
Loading…
Reference in New Issue