Loading core/jni/android_media_ToneGenerator.cpp +1 −3 Original line number Diff line number Diff line Loading @@ -72,10 +72,8 @@ static void android_media_ToneGenerator_release(JNIEnv *env, jobject thiz) { env->SetIntField(thiz, fields.context, 0); if (lpToneGen) { delete lpToneGen; } } static void android_media_ToneGenerator_native_setup(JNIEnv *env, jobject thiz, jint streamType, jint volume) { Loading media/jni/soundpool/SoundPool.cpp +4 −3 Original line number Diff line number Diff line Loading @@ -840,7 +840,7 @@ void SoundChannel::autoResume() void SoundChannel::setRate(float rate) { Mutex::Autolock lock(&mLock); if (mAudioTrack != 0 && mSample.get() != 0) { if (mAudioTrack != NULL && mSample != 0) { uint32_t sampleRate = uint32_t(float(mSample->sampleRate()) * rate + 0.5); mAudioTrack->setSampleRate(sampleRate); mRate = rate; Loading @@ -852,7 +852,8 @@ void SoundChannel::setVolume_l(float leftVolume, float rightVolume) { mLeftVolume = leftVolume; mRightVolume = rightVolume; if (mAudioTrack != 0) mAudioTrack->setVolume(leftVolume, rightVolume); if (mAudioTrack != NULL) mAudioTrack->setVolume(leftVolume, rightVolume); } void SoundChannel::setVolume(float leftVolume, float rightVolume) Loading @@ -864,7 +865,7 @@ void SoundChannel::setVolume(float leftVolume, float rightVolume) void SoundChannel::setLoop(int loop) { Mutex::Autolock lock(&mLock); if (mAudioTrack != 0 && mSample.get() != 0) { if (mAudioTrack != NULL && mSample != 0) { uint32_t loopEnd = mSample->size()/mNumChannels/ ((mSample->format() == AUDIO_FORMAT_PCM_16_BIT) ? sizeof(int16_t) : sizeof(uint8_t)); mAudioTrack->setLoop(0, loopEnd, loop); Loading media/jni/soundpool/SoundPool.h +1 −1 Original line number Diff line number Diff line Loading @@ -116,7 +116,7 @@ protected: class SoundChannel : public SoundEvent { public: enum state { IDLE, RESUMING, STOPPING, PAUSED, PLAYING }; SoundChannel() : mAudioTrack(0), mState(IDLE), mNumChannels(1), SoundChannel() : mAudioTrack(NULL), mState(IDLE), mNumChannels(1), mPos(0), mToggle(0), mAutoPaused(false) {} ~SoundChannel(); void init(SoundPool* soundPool); Loading media/libmedia/IAudioFlinger.cpp +1 −1 Original line number Diff line number Diff line Loading @@ -559,7 +559,7 @@ public: if (status != NO_ERROR) { return status; } if (numEffects) { if (numEffects != NULL) { *numEffects = (uint32_t)reply.readInt32(); } return NO_ERROR; Loading media/libmedia/JetPlayer.cpp +3 −5 Original line number Diff line number Diff line Loading @@ -246,14 +246,12 @@ int JetPlayer::render() { }//while (1) threadExit: if (mAudioTrack) { if (mAudioTrack != NULL) { mAudioTrack->stop(); mAudioTrack->flush(); } if (mAudioBuffer) { delete [] mAudioBuffer; mAudioBuffer = NULL; } mMutex.lock(); mTid = -1; mCondition.signal(); Loading Loading
core/jni/android_media_ToneGenerator.cpp +1 −3 Original line number Diff line number Diff line Loading @@ -72,10 +72,8 @@ static void android_media_ToneGenerator_release(JNIEnv *env, jobject thiz) { env->SetIntField(thiz, fields.context, 0); if (lpToneGen) { delete lpToneGen; } } static void android_media_ToneGenerator_native_setup(JNIEnv *env, jobject thiz, jint streamType, jint volume) { Loading
media/jni/soundpool/SoundPool.cpp +4 −3 Original line number Diff line number Diff line Loading @@ -840,7 +840,7 @@ void SoundChannel::autoResume() void SoundChannel::setRate(float rate) { Mutex::Autolock lock(&mLock); if (mAudioTrack != 0 && mSample.get() != 0) { if (mAudioTrack != NULL && mSample != 0) { uint32_t sampleRate = uint32_t(float(mSample->sampleRate()) * rate + 0.5); mAudioTrack->setSampleRate(sampleRate); mRate = rate; Loading @@ -852,7 +852,8 @@ void SoundChannel::setVolume_l(float leftVolume, float rightVolume) { mLeftVolume = leftVolume; mRightVolume = rightVolume; if (mAudioTrack != 0) mAudioTrack->setVolume(leftVolume, rightVolume); if (mAudioTrack != NULL) mAudioTrack->setVolume(leftVolume, rightVolume); } void SoundChannel::setVolume(float leftVolume, float rightVolume) Loading @@ -864,7 +865,7 @@ void SoundChannel::setVolume(float leftVolume, float rightVolume) void SoundChannel::setLoop(int loop) { Mutex::Autolock lock(&mLock); if (mAudioTrack != 0 && mSample.get() != 0) { if (mAudioTrack != NULL && mSample != 0) { uint32_t loopEnd = mSample->size()/mNumChannels/ ((mSample->format() == AUDIO_FORMAT_PCM_16_BIT) ? sizeof(int16_t) : sizeof(uint8_t)); mAudioTrack->setLoop(0, loopEnd, loop); Loading
media/jni/soundpool/SoundPool.h +1 −1 Original line number Diff line number Diff line Loading @@ -116,7 +116,7 @@ protected: class SoundChannel : public SoundEvent { public: enum state { IDLE, RESUMING, STOPPING, PAUSED, PLAYING }; SoundChannel() : mAudioTrack(0), mState(IDLE), mNumChannels(1), SoundChannel() : mAudioTrack(NULL), mState(IDLE), mNumChannels(1), mPos(0), mToggle(0), mAutoPaused(false) {} ~SoundChannel(); void init(SoundPool* soundPool); Loading
media/libmedia/IAudioFlinger.cpp +1 −1 Original line number Diff line number Diff line Loading @@ -559,7 +559,7 @@ public: if (status != NO_ERROR) { return status; } if (numEffects) { if (numEffects != NULL) { *numEffects = (uint32_t)reply.readInt32(); } return NO_ERROR; Loading
media/libmedia/JetPlayer.cpp +3 −5 Original line number Diff line number Diff line Loading @@ -246,14 +246,12 @@ int JetPlayer::render() { }//while (1) threadExit: if (mAudioTrack) { if (mAudioTrack != NULL) { mAudioTrack->stop(); mAudioTrack->flush(); } if (mAudioBuffer) { delete [] mAudioBuffer; mAudioBuffer = NULL; } mMutex.lock(); mTid = -1; mCondition.signal(); Loading