Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 383c4b3e authored by Eric Laurent's avatar Eric Laurent Committed by Android (Google) Code Review
Browse files

Merge "reorganize SoundPool and JetPlayer code."

parents 56ca534e f5e18125
Loading
Loading
Loading
Loading
+2 −3
Original line number Original line Diff line number Diff line
@@ -18,7 +18,6 @@
#define JETPLAYER_H_
#define JETPLAYER_H_


#include <utils/threads.h>
#include <utils/threads.h>
#include <nativehelper/jni.h>


#include <libsonivox/jet.h>
#include <libsonivox/jet.h>
#include <libsonivox/eas_types.h>
#include <libsonivox/eas_types.h>
@@ -40,7 +39,7 @@ public:
    static const int JET_NUMQUEUEDSEGMENT_UPDATE = 3;
    static const int JET_NUMQUEUEDSEGMENT_UPDATE = 3;
    static const int JET_PAUSE_UPDATE            = 4;
    static const int JET_PAUSE_UPDATE            = 4;


    JetPlayer(jobject javaJetPlayer,
    JetPlayer(void *javaJetPlayer,
            int maxTracks = 32,
            int maxTracks = 32,
            int trackBufferSize = 1200);
            int trackBufferSize = 1200);
    ~JetPlayer();
    ~JetPlayer();
@@ -75,7 +74,7 @@ private:


    jetevent_callback   mEventCallback;
    jetevent_callback   mEventCallback;


    jobject             mJavaJetPlayerRef;
    void*               mJavaJetPlayerRef;
    Mutex               mMutex; // mutex to sync the render and playback thread with the JET calls
    Mutex               mMutex; // mutex to sync the render and playback thread with the JET calls
    pid_t               mTid;
    pid_t               mTid;
    Condition           mCondition;
    Condition           mCondition;
+4 −4
Original line number Original line Diff line number Diff line
@@ -2,14 +2,14 @@ LOCAL_PATH:= $(call my-dir)
include $(CLEAR_VARS)
include $(CLEAR_VARS)


LOCAL_SRC_FILES:= \
LOCAL_SRC_FILES:= \
	android_media_SoundPool.cpp \
	android_media_SoundPool.cpp
	SoundPool.cpp \

	SoundPoolThread.cpp
LOCAL_C_INCLUDES := \
    frameworks/base/media/libmedia


LOCAL_SHARED_LIBRARIES := \
LOCAL_SHARED_LIBRARIES := \
	libcutils \
	libcutils \
	libutils \
	libutils \
	libbinder \
	libandroid_runtime \
	libandroid_runtime \
	libnativehelper \
	libnativehelper \
	libmedia \
	libmedia \
+1 −1
Original line number Original line Diff line number Diff line
@@ -23,7 +23,7 @@
#include <nativehelper/jni.h>
#include <nativehelper/jni.h>
#include <nativehelper/JNIHelp.h>
#include <nativehelper/JNIHelp.h>
#include <android_runtime/AndroidRuntime.h>
#include <android_runtime/AndroidRuntime.h>
#include "SoundPool.h"
#include <SoundPool.h>


using namespace android;
using namespace android;


+3 −1
Original line number Original line Diff line number Diff line
@@ -43,7 +43,9 @@ LOCAL_SRC_FILES:= \
    IEffectClient.cpp \
    IEffectClient.cpp \
    AudioEffect.cpp \
    AudioEffect.cpp \
    Visualizer.cpp \
    Visualizer.cpp \
    MemoryLeakTrackUtil.cpp
    MemoryLeakTrackUtil.cpp \
    SoundPool.cpp \
    SoundPoolThread.cpp


LOCAL_SHARED_LIBRARIES := \
LOCAL_SHARED_LIBRARIES := \
	libui libcutils libutils libbinder libsonivox libicuuc libexpat \
	libui libcutils libutils libbinder libsonivox libicuuc libexpat \
+1 −1
Original line number Original line Diff line number Diff line
@@ -30,7 +30,7 @@ static const int MIX_NUM_BUFFERS = 4;
static const S_EAS_LIB_CONFIG* pLibConfig = NULL;
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),
        mEventCallback(NULL),
        mJavaJetPlayerRef(javaJetPlayer),
        mJavaJetPlayerRef(javaJetPlayer),
        mTid(-1),
        mTid(-1),
Loading