uint32_t kDefaultSampleRate = 44100;
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",
maxChannels, streamType, srcQuality);
LOGW_IF(maxChannels != mMaxChannels, "App requested %d channels", maxChannels);
mQuit = false;
- mSoundPoolRef = soundPoolRef;
mDecodeThread = 0;
mStreamType = streamType;
mSrcQuality = srcQuality;
friend class SoundPoolThread;
friend class SoundChannel;
public:
- SoundPool(jobject soundPoolRef, int maxChannels, int streamType, int srcQuality);
+ SoundPool(int maxChannels, int streamType, int srcQuality);
~SoundPool();
int load(const char* url, int priority);
int load(int fd, int64_t offset, int64_t length, int priority);
jobject weak_this, jint maxChannels, jint streamType, jint srcQuality)
{
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) {
jniThrowException(env, "java/lang/RuntimeException", "Out of memory");
return;