am 9d5b7aca: Merge change Ic0e3ddf8 into eclair-mr2
Merge commit '9d5b7aca742f44e4b16db66a4a372eb71325470f' into eclair-mr2-plus-aosp * commit '9d5b7aca742f44e4b16db66a4a372eb71325470f': Remove unused Java object reference in native SoundPool code.
This commit is contained in:
@@ -38,7 +38,7 @@ uint32_t kMaxSampleRate = 48000;
|
|||||||
uint32_t kDefaultSampleRate = 44100;
|
uint32_t kDefaultSampleRate = 44100;
|
||||||
uint32_t kDefaultFrameCount = 1200;
|
uint32_t kDefaultFrameCount = 1200;
|
||||||
|
|
||||||
SoundPool::SoundPool(jobject soundPoolRef, int maxChannels, int streamType, int srcQuality)
|
SoundPool::SoundPool(int maxChannels, int streamType, int srcQuality)
|
||||||
{
|
{
|
||||||
LOGV("SoundPool constructor: maxChannels=%d, streamType=%d, srcQuality=%d",
|
LOGV("SoundPool constructor: maxChannels=%d, streamType=%d, srcQuality=%d",
|
||||||
maxChannels, streamType, srcQuality);
|
maxChannels, streamType, srcQuality);
|
||||||
@@ -54,7 +54,6 @@ SoundPool::SoundPool(jobject soundPoolRef, int maxChannels, int streamType, int
|
|||||||
LOGW_IF(maxChannels != mMaxChannels, "App requested %d channels", maxChannels);
|
LOGW_IF(maxChannels != mMaxChannels, "App requested %d channels", maxChannels);
|
||||||
|
|
||||||
mQuit = false;
|
mQuit = false;
|
||||||
mSoundPoolRef = soundPoolRef;
|
|
||||||
mDecodeThread = 0;
|
mDecodeThread = 0;
|
||||||
mStreamType = streamType;
|
mStreamType = streamType;
|
||||||
mSrcQuality = srcQuality;
|
mSrcQuality = srcQuality;
|
||||||
|
|||||||
@@ -159,7 +159,7 @@ class SoundPool {
|
|||||||
friend class SoundPoolThread;
|
friend class SoundPoolThread;
|
||||||
friend class SoundChannel;
|
friend class SoundChannel;
|
||||||
public:
|
public:
|
||||||
SoundPool(jobject soundPoolRef, int maxChannels, int streamType, int srcQuality);
|
SoundPool(int maxChannels, int streamType, int srcQuality);
|
||||||
~SoundPool();
|
~SoundPool();
|
||||||
int load(const char* url, int priority);
|
int load(const char* url, int priority);
|
||||||
int load(int fd, int64_t offset, int64_t length, int priority);
|
int load(int fd, int64_t offset, int64_t length, int priority);
|
||||||
|
|||||||
@@ -154,7 +154,7 @@ android_media_SoundPool_native_setup(JNIEnv *env, jobject thiz,
|
|||||||
jobject weak_this, jint maxChannels, jint streamType, jint srcQuality)
|
jobject weak_this, jint maxChannels, jint streamType, jint srcQuality)
|
||||||
{
|
{
|
||||||
LOGV("android_media_SoundPool_native_setup");
|
LOGV("android_media_SoundPool_native_setup");
|
||||||
SoundPool *ap = new SoundPool(weak_this, maxChannels, streamType, srcQuality);
|
SoundPool *ap = new SoundPool(maxChannels, streamType, srcQuality);
|
||||||
if (ap == NULL) {
|
if (ap == NULL) {
|
||||||
jniThrowException(env, "java/lang/RuntimeException", "Out of memory");
|
jniThrowException(env, "java/lang/RuntimeException", "Out of memory");
|
||||||
return;
|
return;
|
||||||
|
|||||||
Reference in New Issue
Block a user