diff options
-rw-r--r-- | include/media/JetPlayer.h | 5 | ||||
-rw-r--r-- | media/jni/soundpool/Android.mk | 8 | ||||
-rw-r--r-- | media/jni/soundpool/android_media_SoundPool.cpp | 2 | ||||
-rw-r--r-- | media/libmedia/Android.mk | 4 | ||||
-rw-r--r-- | media/libmedia/JetPlayer.cpp | 2 | ||||
-rw-r--r-- | media/libmedia/SoundPool.cpp (renamed from media/jni/soundpool/SoundPool.cpp) | 2 | ||||
-rw-r--r-- | media/libmedia/SoundPool.h (renamed from media/jni/soundpool/SoundPool.h) | 0 | ||||
-rw-r--r-- | media/libmedia/SoundPoolThread.cpp (renamed from media/jni/soundpool/SoundPoolThread.cpp) | 0 | ||||
-rw-r--r-- | media/libmedia/SoundPoolThread.h (renamed from media/jni/soundpool/SoundPoolThread.h) | 0 |
9 files changed, 12 insertions, 11 deletions
diff --git a/include/media/JetPlayer.h b/include/media/JetPlayer.h index 38a3e44..0616bf0 100644 --- a/include/media/JetPlayer.h +++ b/include/media/JetPlayer.h @@ -18,7 +18,6 @@ #define JETPLAYER_H_ #include <utils/threads.h> -#include <nativehelper/jni.h> #include <libsonivox/jet.h> #include <libsonivox/eas_types.h> @@ -40,7 +39,7 @@ public: static const int JET_NUMQUEUEDSEGMENT_UPDATE = 3; static const int JET_PAUSE_UPDATE = 4; - JetPlayer(jobject javaJetPlayer, + JetPlayer(void *javaJetPlayer, int maxTracks = 32, int trackBufferSize = 1200); ~JetPlayer(); @@ -75,7 +74,7 @@ private: jetevent_callback mEventCallback; - jobject mJavaJetPlayerRef; + void* mJavaJetPlayerRef; Mutex mMutex; // mutex to sync the render and playback thread with the JET calls pid_t mTid; Condition mCondition; diff --git a/media/jni/soundpool/Android.mk b/media/jni/soundpool/Android.mk index 98d6449..70dbfb3 100644 --- a/media/jni/soundpool/Android.mk +++ b/media/jni/soundpool/Android.mk @@ -2,14 +2,14 @@ LOCAL_PATH:= $(call my-dir) include $(CLEAR_VARS) LOCAL_SRC_FILES:= \ - android_media_SoundPool.cpp \ - SoundPool.cpp \ - SoundPoolThread.cpp + android_media_SoundPool.cpp + +LOCAL_C_INCLUDES := \ + frameworks/base/media/libmedia LOCAL_SHARED_LIBRARIES := \ libcutils \ libutils \ - libbinder \ libandroid_runtime \ libnativehelper \ libmedia \ diff --git a/media/jni/soundpool/android_media_SoundPool.cpp b/media/jni/soundpool/android_media_SoundPool.cpp index da3af9d..c6dee06 100644 --- a/media/jni/soundpool/android_media_SoundPool.cpp +++ b/media/jni/soundpool/android_media_SoundPool.cpp @@ -23,7 +23,7 @@ #include <nativehelper/jni.h> #include <nativehelper/JNIHelp.h> #include <android_runtime/AndroidRuntime.h> -#include "SoundPool.h" +#include <SoundPool.h> using namespace android; diff --git a/media/libmedia/Android.mk b/media/libmedia/Android.mk index c34e23b..0db6938 100644 --- a/media/libmedia/Android.mk +++ b/media/libmedia/Android.mk @@ -43,7 +43,9 @@ LOCAL_SRC_FILES:= \ IEffectClient.cpp \ AudioEffect.cpp \ Visualizer.cpp \ - MemoryLeakTrackUtil.cpp + MemoryLeakTrackUtil.cpp \ + SoundPool.cpp \ + SoundPoolThread.cpp LOCAL_SHARED_LIBRARIES := \ libui libcutils libutils libbinder libsonivox libicuuc libexpat \ diff --git a/media/libmedia/JetPlayer.cpp b/media/libmedia/JetPlayer.cpp index 7fa6bb7..52aee49 100644 --- a/media/libmedia/JetPlayer.cpp +++ b/media/libmedia/JetPlayer.cpp @@ -30,7 +30,7 @@ static const int MIX_NUM_BUFFERS = 4; static const S_EAS_LIB_CONFIG* pLibConfig = NULL; //------------------------------------------------------------------------------------------------- -JetPlayer::JetPlayer(jobject javaJetPlayer, int maxTracks, int trackBufferSize) : +JetPlayer::JetPlayer(void *javaJetPlayer, int maxTracks, int trackBufferSize) : mEventCallback(NULL), mJavaJetPlayerRef(javaJetPlayer), mTid(-1), diff --git a/media/jni/soundpool/SoundPool.cpp b/media/libmedia/SoundPool.cpp index 5aed8a1..306c57d 100644 --- a/media/jni/soundpool/SoundPool.cpp +++ b/media/libmedia/SoundPool.cpp @@ -685,7 +685,7 @@ void SoundChannel::nextEvent() void SoundChannel::callback(int event, void* user, void *info) { SoundChannel* channel = static_cast<SoundChannel*>((void *)((unsigned long)user & ~1)); - + channel->process(event, info, (unsigned long)user & 1); } diff --git a/media/jni/soundpool/SoundPool.h b/media/libmedia/SoundPool.h index 002b045..002b045 100644 --- a/media/jni/soundpool/SoundPool.h +++ b/media/libmedia/SoundPool.h diff --git a/media/jni/soundpool/SoundPoolThread.cpp b/media/libmedia/SoundPoolThread.cpp index ba3b482..ba3b482 100644 --- a/media/jni/soundpool/SoundPoolThread.cpp +++ b/media/libmedia/SoundPoolThread.cpp diff --git a/media/jni/soundpool/SoundPoolThread.h b/media/libmedia/SoundPoolThread.h index d388388..d388388 100644 --- a/media/jni/soundpool/SoundPoolThread.h +++ b/media/libmedia/SoundPoolThread.h |