Merge "No newline or space at end of ALOG format string"
This commit is contained in:
@@ -39,7 +39,7 @@ struct fields_t {
|
||||
static fields_t fields;
|
||||
|
||||
static jboolean android_media_ToneGenerator_startTone(JNIEnv *env, jobject thiz, jint toneType, jint durationMs) {
|
||||
ALOGV("android_media_ToneGenerator_startTone: %x\n", (int)thiz);
|
||||
ALOGV("android_media_ToneGenerator_startTone: %x", (int)thiz);
|
||||
|
||||
ToneGenerator *lpToneGen = (ToneGenerator *)env->GetIntField(thiz,
|
||||
fields.context);
|
||||
@@ -52,12 +52,12 @@ static jboolean android_media_ToneGenerator_startTone(JNIEnv *env, jobject thiz,
|
||||
}
|
||||
|
||||
static void android_media_ToneGenerator_stopTone(JNIEnv *env, jobject thiz) {
|
||||
ALOGV("android_media_ToneGenerator_stopTone: %x\n", (int)thiz);
|
||||
ALOGV("android_media_ToneGenerator_stopTone: %x", (int)thiz);
|
||||
|
||||
ToneGenerator *lpToneGen = (ToneGenerator *)env->GetIntField(thiz,
|
||||
fields.context);
|
||||
|
||||
ALOGV("ToneGenerator lpToneGen: %x\n", (unsigned int)lpToneGen);
|
||||
ALOGV("ToneGenerator lpToneGen: %x", (unsigned int)lpToneGen);
|
||||
if (lpToneGen == NULL) {
|
||||
jniThrowRuntimeException(env, "Method called after release()");
|
||||
return;
|
||||
@@ -68,7 +68,7 @@ static void android_media_ToneGenerator_stopTone(JNIEnv *env, jobject thiz) {
|
||||
static void android_media_ToneGenerator_release(JNIEnv *env, jobject thiz) {
|
||||
ToneGenerator *lpToneGen = (ToneGenerator *)env->GetIntField(thiz,
|
||||
fields.context);
|
||||
ALOGV("android_media_ToneGenerator_release lpToneGen: %x\n", (int)lpToneGen);
|
||||
ALOGV("android_media_ToneGenerator_release lpToneGen: %x", (int)lpToneGen);
|
||||
|
||||
env->SetIntField(thiz, fields.context, 0);
|
||||
|
||||
@@ -83,17 +83,17 @@ static void android_media_ToneGenerator_native_setup(JNIEnv *env, jobject thiz,
|
||||
|
||||
env->SetIntField(thiz, fields.context, 0);
|
||||
|
||||
ALOGV("android_media_ToneGenerator_native_setup jobject: %x\n", (int)thiz);
|
||||
ALOGV("android_media_ToneGenerator_native_setup jobject: %x", (int)thiz);
|
||||
|
||||
if (lpToneGen == NULL) {
|
||||
ALOGE("ToneGenerator creation failed \n");
|
||||
ALOGE("ToneGenerator creation failed");
|
||||
jniThrowException(env, "java/lang/OutOfMemoryError", NULL);
|
||||
return;
|
||||
}
|
||||
ALOGV("ToneGenerator lpToneGen: %x\n", (unsigned int)lpToneGen);
|
||||
ALOGV("ToneGenerator lpToneGen: %x", (unsigned int)lpToneGen);
|
||||
|
||||
if (!lpToneGen->isInited()) {
|
||||
ALOGE("ToneGenerator init failed \n");
|
||||
ALOGE("ToneGenerator init failed");
|
||||
jniThrowRuntimeException(env, "Init failed");
|
||||
return;
|
||||
}
|
||||
@@ -101,18 +101,18 @@ static void android_media_ToneGenerator_native_setup(JNIEnv *env, jobject thiz,
|
||||
// Stow our new C++ ToneGenerator in an opaque field in the Java object.
|
||||
env->SetIntField(thiz, fields.context, (int)lpToneGen);
|
||||
|
||||
ALOGV("ToneGenerator fields.context: %x\n", env->GetIntField(thiz, fields.context));
|
||||
ALOGV("ToneGenerator fields.context: %x", env->GetIntField(thiz, fields.context));
|
||||
}
|
||||
|
||||
static void android_media_ToneGenerator_native_finalize(JNIEnv *env,
|
||||
jobject thiz) {
|
||||
ALOGV("android_media_ToneGenerator_native_finalize jobject: %x\n", (int)thiz);
|
||||
ALOGV("android_media_ToneGenerator_native_finalize jobject: %x", (int)thiz);
|
||||
|
||||
ToneGenerator *lpToneGen = (ToneGenerator *)env->GetIntField(thiz,
|
||||
fields.context);
|
||||
|
||||
if (lpToneGen) {
|
||||
ALOGV("delete lpToneGen: %x\n", (int)lpToneGen);
|
||||
if (lpToneGen != NULL) {
|
||||
ALOGV("delete lpToneGen: %p", lpToneGen);
|
||||
delete lpToneGen;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -159,7 +159,7 @@ status_t AudioEffect::set(const effect_uuid_t *type,
|
||||
mCblk->buffer = (uint8_t *)mCblk + bufOffset;
|
||||
|
||||
iEffect->asBinder()->linkToDeath(mIEffectClient);
|
||||
ALOGV("set() %p OK effect: %s id: %d status %d enabled %d, ", this, mDescriptor.name, mId, mStatus, mEnabled);
|
||||
ALOGV("set() %p OK effect: %s id: %d status %d enabled %d", this, mDescriptor.name, mId, mStatus, mEnabled);
|
||||
|
||||
return mStatus;
|
||||
}
|
||||
|
||||
@@ -349,7 +349,7 @@ void MediaProfiles::addImageEncodingQualityLevel(int cameraId, const char** atts
|
||||
{
|
||||
CHECK(!strcmp("quality", atts[0]));
|
||||
int quality = atoi(atts[1]);
|
||||
ALOGV("%s: cameraId=%d, quality=%d\n", __func__, cameraId, quality);
|
||||
ALOGV("%s: cameraId=%d, quality=%d", __func__, cameraId, quality);
|
||||
ImageEncodingQualityLevels *levels = findImageEncodingQualityLevels(cameraId);
|
||||
|
||||
if (levels == NULL) {
|
||||
|
||||
@@ -143,7 +143,7 @@ MediaScanResult MediaScanner::doProcessDirectory(
|
||||
if (pathRemaining >= 8 /* strlen(".nomedia") */ ) {
|
||||
strcpy(fileSpot, ".nomedia");
|
||||
if (access(path, F_OK) == 0) {
|
||||
ALOGV("found .nomedia, setting noMedia flag\n");
|
||||
ALOGV("found .nomedia, setting noMedia flag");
|
||||
noMedia = true;
|
||||
}
|
||||
|
||||
|
||||
@@ -142,12 +142,12 @@ void MediaScannerClient::convertValues(uint32_t encoding)
|
||||
|
||||
UConverter *conv = ucnv_open(enc, &status);
|
||||
if (U_FAILURE(status)) {
|
||||
ALOGE("could not create UConverter for %s\n", enc);
|
||||
ALOGE("could not create UConverter for %s", enc);
|
||||
return;
|
||||
}
|
||||
UConverter *utf8Conv = ucnv_open("UTF-8", &status);
|
||||
if (U_FAILURE(status)) {
|
||||
ALOGE("could not create UConverter for UTF-8\n");
|
||||
ALOGE("could not create UConverter for UTF-8");
|
||||
ucnv_close(conv);
|
||||
return;
|
||||
}
|
||||
@@ -181,7 +181,7 @@ void MediaScannerClient::convertValues(uint32_t encoding)
|
||||
ucnv_convertEx(utf8Conv, conv, &target, target + targetLength,
|
||||
&source, (const char *)dest, NULL, NULL, NULL, NULL, TRUE, TRUE, &status);
|
||||
if (U_FAILURE(status)) {
|
||||
ALOGE("ucnv_convertEx failed: %d\n", status);
|
||||
ALOGE("ucnv_convertEx failed: %d", status);
|
||||
mValues->setEntry(i, "???");
|
||||
} else {
|
||||
// zero terminate
|
||||
|
||||
@@ -800,7 +800,7 @@ const unsigned char /*tone_type*/ ToneGenerator::sToneMappingTable[NUM_REGIONS-1
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
ToneGenerator::ToneGenerator(audio_stream_type_t streamType, float volume, bool threadCanCallJava) {
|
||||
|
||||
ALOGV("ToneGenerator constructor: streamType=%d, volume=%f\n", streamType, volume);
|
||||
ALOGV("ToneGenerator constructor: streamType=%d, volume=%f", streamType, volume);
|
||||
|
||||
mState = TONE_IDLE;
|
||||
|
||||
@@ -829,9 +829,9 @@ ToneGenerator::ToneGenerator(audio_stream_type_t streamType, float volume, bool
|
||||
}
|
||||
|
||||
if (initAudioTrack()) {
|
||||
ALOGV("ToneGenerator INIT OK, time: %d\n", (unsigned int)(systemTime()/1000000));
|
||||
ALOGV("ToneGenerator INIT OK, time: %d", (unsigned int)(systemTime()/1000000));
|
||||
} else {
|
||||
ALOGV("!!!ToneGenerator INIT FAILED!!!\n");
|
||||
ALOGV("!!!ToneGenerator INIT FAILED!!!");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -853,11 +853,11 @@ ToneGenerator::ToneGenerator(audio_stream_type_t streamType, float volume, bool
|
||||
//
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
ToneGenerator::~ToneGenerator() {
|
||||
ALOGV("ToneGenerator destructor\n");
|
||||
ALOGV("ToneGenerator destructor");
|
||||
|
||||
if (mpAudioTrack != NULL) {
|
||||
stopTone();
|
||||
ALOGV("Delete Track: %p\n", mpAudioTrack);
|
||||
ALOGV("Delete Track: %p", mpAudioTrack);
|
||||
delete mpAudioTrack;
|
||||
}
|
||||
}
|
||||
@@ -892,7 +892,7 @@ bool ToneGenerator::startTone(tone_type toneType, int durationMs) {
|
||||
}
|
||||
}
|
||||
|
||||
ALOGV("startTone\n");
|
||||
ALOGV("startTone");
|
||||
|
||||
mLock.lock();
|
||||
|
||||
@@ -915,7 +915,7 @@ bool ToneGenerator::startTone(tone_type toneType, int durationMs) {
|
||||
|
||||
if (mState == TONE_INIT) {
|
||||
if (prepareWave()) {
|
||||
ALOGV("Immediate start, time %d\n", (unsigned int)(systemTime()/1000000));
|
||||
ALOGV("Immediate start, time %d", (unsigned int)(systemTime()/1000000));
|
||||
lResult = true;
|
||||
mState = TONE_STARTING;
|
||||
mLock.unlock();
|
||||
@@ -934,7 +934,7 @@ bool ToneGenerator::startTone(tone_type toneType, int durationMs) {
|
||||
mState = TONE_IDLE;
|
||||
}
|
||||
} else {
|
||||
ALOGV("Delayed start\n");
|
||||
ALOGV("Delayed start");
|
||||
mState = TONE_RESTARTING;
|
||||
lStatus = mWaitCbkCond.waitRelative(mLock, seconds(3));
|
||||
if (lStatus == NO_ERROR) {
|
||||
@@ -949,8 +949,8 @@ bool ToneGenerator::startTone(tone_type toneType, int durationMs) {
|
||||
}
|
||||
mLock.unlock();
|
||||
|
||||
ALOGV_IF(lResult, "Tone started, time %d\n", (unsigned int)(systemTime()/1000000));
|
||||
ALOGW_IF(!lResult, "Tone start failed!!!, time %d\n", (unsigned int)(systemTime()/1000000));
|
||||
ALOGV_IF(lResult, "Tone started, time %d", (unsigned int)(systemTime()/1000000));
|
||||
ALOGW_IF(!lResult, "Tone start failed!!!, time %d", (unsigned int)(systemTime()/1000000));
|
||||
|
||||
return lResult;
|
||||
}
|
||||
@@ -1017,7 +1017,7 @@ bool ToneGenerator::initAudioTrack() {
|
||||
|
||||
// Open audio track in mono, PCM 16bit, default sampling rate, default buffer size
|
||||
mpAudioTrack = new AudioTrack();
|
||||
ALOGV("Create Track: %p\n", mpAudioTrack);
|
||||
ALOGV("Create Track: %p", mpAudioTrack);
|
||||
|
||||
mpAudioTrack->set(mStreamType,
|
||||
0,
|
||||
@@ -1046,7 +1046,7 @@ initAudioTrack_exit:
|
||||
|
||||
// Cleanup
|
||||
if (mpAudioTrack) {
|
||||
ALOGV("Delete Track I: %p\n", mpAudioTrack);
|
||||
ALOGV("Delete Track I: %p", mpAudioTrack);
|
||||
delete mpAudioTrack;
|
||||
mpAudioTrack = NULL;
|
||||
}
|
||||
@@ -1141,7 +1141,7 @@ void ToneGenerator::audioCallback(int event, void* user, void *info) {
|
||||
if (lpToneGen->mTotalSmp > lpToneGen->mNextSegSmp) {
|
||||
// Time to go to next sequence segment
|
||||
|
||||
ALOGV("End Segment, time: %d\n", (unsigned int)(systemTime()/1000000));
|
||||
ALOGV("End Segment, time: %d", (unsigned int)(systemTime()/1000000));
|
||||
|
||||
lGenSmp = lReqSmp;
|
||||
|
||||
@@ -1156,13 +1156,13 @@ void ToneGenerator::audioCallback(int event, void* user, void *info) {
|
||||
lpWaveGen->getSamples(lpOut, lGenSmp, lWaveCmd);
|
||||
lFrequency = lpToneDesc->segments[lpToneGen->mCurSegment].waveFreq[++lFreqIdx];
|
||||
}
|
||||
ALOGV("ON->OFF, lGenSmp: %d, lReqSmp: %d\n", lGenSmp, lReqSmp);
|
||||
ALOGV("ON->OFF, lGenSmp: %d, lReqSmp: %d", lGenSmp, lReqSmp);
|
||||
}
|
||||
|
||||
// check if we need to loop and loop for the reqd times
|
||||
if (lpToneDesc->segments[lpToneGen->mCurSegment].loopCnt) {
|
||||
if (lpToneGen->mLoopCounter < lpToneDesc->segments[lpToneGen->mCurSegment].loopCnt) {
|
||||
ALOGV ("in if loop loopCnt(%d) loopctr(%d), CurSeg(%d) \n",
|
||||
ALOGV ("in if loop loopCnt(%d) loopctr(%d), CurSeg(%d)",
|
||||
lpToneDesc->segments[lpToneGen->mCurSegment].loopCnt,
|
||||
lpToneGen->mLoopCounter,
|
||||
lpToneGen->mCurSegment);
|
||||
@@ -1172,14 +1172,14 @@ void ToneGenerator::audioCallback(int event, void* user, void *info) {
|
||||
// completed loop. go to next segment
|
||||
lpToneGen->mLoopCounter = 0;
|
||||
lpToneGen->mCurSegment++;
|
||||
ALOGV ("in else loop loopCnt(%d) loopctr(%d), CurSeg(%d) \n",
|
||||
ALOGV ("in else loop loopCnt(%d) loopctr(%d), CurSeg(%d)",
|
||||
lpToneDesc->segments[lpToneGen->mCurSegment].loopCnt,
|
||||
lpToneGen->mLoopCounter,
|
||||
lpToneGen->mCurSegment);
|
||||
}
|
||||
} else {
|
||||
lpToneGen->mCurSegment++;
|
||||
ALOGV ("Goto next seg loopCnt(%d) loopctr(%d), CurSeg(%d) \n",
|
||||
ALOGV ("Goto next seg loopCnt(%d) loopctr(%d), CurSeg(%d)",
|
||||
lpToneDesc->segments[lpToneGen->mCurSegment].loopCnt,
|
||||
lpToneGen->mLoopCounter,
|
||||
lpToneGen->mCurSegment);
|
||||
@@ -1188,32 +1188,32 @@ void ToneGenerator::audioCallback(int event, void* user, void *info) {
|
||||
|
||||
// Handle loop if last segment reached
|
||||
if (lpToneDesc->segments[lpToneGen->mCurSegment].duration == 0) {
|
||||
ALOGV("Last Seg: %d\n", lpToneGen->mCurSegment);
|
||||
ALOGV("Last Seg: %d", lpToneGen->mCurSegment);
|
||||
|
||||
// Pre increment loop count and restart if total count not reached. Stop sequence otherwise
|
||||
if (++lpToneGen->mCurCount <= lpToneDesc->repeatCnt) {
|
||||
ALOGV("Repeating Count: %d\n", lpToneGen->mCurCount);
|
||||
ALOGV("Repeating Count: %d", lpToneGen->mCurCount);
|
||||
|
||||
lpToneGen->mCurSegment = lpToneDesc->repeatSegment;
|
||||
if (lpToneDesc->segments[lpToneDesc->repeatSegment].waveFreq[0] != 0) {
|
||||
lWaveCmd = WaveGenerator::WAVEGEN_START;
|
||||
}
|
||||
|
||||
ALOGV("New segment %d, Next Time: %d\n", lpToneGen->mCurSegment,
|
||||
ALOGV("New segment %d, Next Time: %d", lpToneGen->mCurSegment,
|
||||
(lpToneGen->mNextSegSmp*1000)/lpToneGen->mSamplingRate);
|
||||
|
||||
} else {
|
||||
lGenSmp = 0;
|
||||
ALOGV("End repeat, time: %d\n", (unsigned int)(systemTime()/1000000));
|
||||
ALOGV("End repeat, time: %d", (unsigned int)(systemTime()/1000000));
|
||||
}
|
||||
} else {
|
||||
ALOGV("New segment %d, Next Time: %d\n", lpToneGen->mCurSegment,
|
||||
ALOGV("New segment %d, Next Time: %d", lpToneGen->mCurSegment,
|
||||
(lpToneGen->mNextSegSmp*1000)/lpToneGen->mSamplingRate);
|
||||
if (lpToneDesc->segments[lpToneGen->mCurSegment].waveFreq[0] != 0) {
|
||||
// If next segment is not silent, OFF -> ON transition : reset wave generator
|
||||
lWaveCmd = WaveGenerator::WAVEGEN_START;
|
||||
|
||||
ALOGV("OFF->ON, lGenSmp: %d, lReqSmp: %d\n", lGenSmp, lReqSmp);
|
||||
ALOGV("OFF->ON, lGenSmp: %d, lReqSmp: %d", lGenSmp, lReqSmp);
|
||||
} else {
|
||||
lGenSmp = 0;
|
||||
}
|
||||
@@ -1251,13 +1251,13 @@ audioCallback_EndLoop:
|
||||
|
||||
switch (lpToneGen->mState) {
|
||||
case TONE_RESTARTING:
|
||||
ALOGV("Cbk restarting track\n");
|
||||
ALOGV("Cbk restarting track");
|
||||
if (lpToneGen->prepareWave()) {
|
||||
lpToneGen->mState = TONE_STARTING;
|
||||
// must reload lpToneDesc as prepareWave() may change mpToneDesc
|
||||
lpToneDesc = lpToneGen->mpToneDesc;
|
||||
} else {
|
||||
ALOGW("Cbk restarting prepareWave() failed\n");
|
||||
ALOGW("Cbk restarting prepareWave() failed");
|
||||
lpToneGen->mState = TONE_IDLE;
|
||||
lpToneGen->mpAudioTrack->stop();
|
||||
// Force loop exit
|
||||
@@ -1266,14 +1266,14 @@ audioCallback_EndLoop:
|
||||
lSignal = true;
|
||||
break;
|
||||
case TONE_STOPPING:
|
||||
ALOGV("Cbk Stopping\n");
|
||||
ALOGV("Cbk Stopping");
|
||||
lpToneGen->mState = TONE_STOPPED;
|
||||
// Force loop exit
|
||||
lNumSmp = 0;
|
||||
break;
|
||||
case TONE_STOPPED:
|
||||
lpToneGen->mState = TONE_INIT;
|
||||
ALOGV("Cbk Stopped track\n");
|
||||
ALOGV("Cbk Stopped track");
|
||||
lpToneGen->mpAudioTrack->stop();
|
||||
// Force loop exit
|
||||
lNumSmp = 0;
|
||||
@@ -1281,7 +1281,7 @@ audioCallback_EndLoop:
|
||||
lSignal = true;
|
||||
break;
|
||||
case TONE_STARTING:
|
||||
ALOGV("Cbk starting track\n");
|
||||
ALOGV("Cbk starting track");
|
||||
lpToneGen->mState = TONE_PLAYING;
|
||||
lSignal = true;
|
||||
break;
|
||||
@@ -1491,7 +1491,7 @@ ToneGenerator::WaveGenerator::WaveGenerator(unsigned short samplingRate,
|
||||
d0 = 32767;
|
||||
mA1_Q14 = (short) d0;
|
||||
|
||||
ALOGV("WaveGenerator init, mA1_Q14: %d, mS2_0: %d, mAmplitude_Q15: %d\n",
|
||||
ALOGV("WaveGenerator init, mA1_Q14: %d, mS2_0: %d, mAmplitude_Q15: %d",
|
||||
mA1_Q14, mS2_0, mAmplitude_Q15);
|
||||
}
|
||||
|
||||
|
||||
@@ -1919,7 +1919,7 @@ bool AudioFlinger::MixerThread::threadLoop()
|
||||
if (CC_UNLIKELY((!activeTracks.size() && systemTime() > standbyTime) ||
|
||||
mSuspended)) {
|
||||
if (!mStandby) {
|
||||
ALOGV("Audio hardware entering standby, mixer %p, mSuspended %d\n", this, mSuspended);
|
||||
ALOGV("Audio hardware entering standby, mixer %p, mSuspended %d", this, mSuspended);
|
||||
mOutput->stream->common.standby(&mOutput->stream->common);
|
||||
mStandby = true;
|
||||
mBytesWritten = 0;
|
||||
@@ -1933,9 +1933,9 @@ bool AudioFlinger::MixerThread::threadLoop()
|
||||
|
||||
releaseWakeLock_l();
|
||||
// wait until we have something to do...
|
||||
ALOGV("MixerThread %p TID %d going to sleep\n", this, gettid());
|
||||
ALOGV("MixerThread %p TID %d going to sleep", this, gettid());
|
||||
mWaitWorkCV.wait(mLock);
|
||||
ALOGV("MixerThread %p TID %d waking up\n", this, gettid());
|
||||
ALOGV("MixerThread %p TID %d waking up", this, gettid());
|
||||
acquireWakeLock_l();
|
||||
|
||||
mPrevMixerStatus = MIXER_IDLE;
|
||||
@@ -2637,7 +2637,7 @@ bool AudioFlinger::DirectOutputThread::threadLoop()
|
||||
mSuspended)) {
|
||||
// wait until we have something to do...
|
||||
if (!mStandby) {
|
||||
ALOGV("Audio hardware entering standby, mixer %p\n", this);
|
||||
ALOGV("Audio hardware entering standby, mixer %p", this);
|
||||
mOutput->stream->common.standby(&mOutput->stream->common);
|
||||
mStandby = true;
|
||||
mBytesWritten = 0;
|
||||
@@ -2650,9 +2650,9 @@ bool AudioFlinger::DirectOutputThread::threadLoop()
|
||||
if (exitPending()) break;
|
||||
|
||||
releaseWakeLock_l();
|
||||
ALOGV("DirectOutputThread %p TID %d going to sleep\n", this, gettid());
|
||||
ALOGV("DirectOutputThread %p TID %d going to sleep", this, gettid());
|
||||
mWaitWorkCV.wait(mLock);
|
||||
ALOGV("DirectOutputThread %p TID %d waking up in active mode\n", this, gettid());
|
||||
ALOGV("DirectOutputThread %p TID %d waking up in active mode", this, gettid());
|
||||
acquireWakeLock_l();
|
||||
|
||||
if (!mMasterMute) {
|
||||
@@ -3045,9 +3045,9 @@ bool AudioFlinger::DuplicatingThread::threadLoop()
|
||||
if (exitPending()) break;
|
||||
|
||||
releaseWakeLock_l();
|
||||
ALOGV("DuplicatingThread %p TID %d going to sleep\n", this, gettid());
|
||||
ALOGV("DuplicatingThread %p TID %d going to sleep", this, gettid());
|
||||
mWaitWorkCV.wait(mLock);
|
||||
ALOGV("DuplicatingThread %p TID %d waking up\n", this, gettid());
|
||||
ALOGV("DuplicatingThread %p TID %d waking up", this, gettid());
|
||||
acquireWakeLock_l();
|
||||
|
||||
mPrevMixerStatus = MIXER_IDLE;
|
||||
@@ -6200,7 +6200,7 @@ sp<AudioFlinger::EffectHandle> AudioFlinger::EffectModule::controlHandle()
|
||||
|
||||
void AudioFlinger::EffectModule::disconnect(const wp<EffectHandle>& handle, bool unpiniflast)
|
||||
{
|
||||
ALOGV("disconnect() %p handle %p ", this, handle.unsafe_get());
|
||||
ALOGV("disconnect() %p handle %p", this, handle.unsafe_get());
|
||||
// keep a strong reference on this EffectModule to avoid calling the
|
||||
// destructor before we exit
|
||||
sp<EffectModule> keep(this);
|
||||
|
||||
@@ -184,7 +184,7 @@ void AudioResamplerOrder1::resampleStereo16(int32_t* out, size_t outFrameCount,
|
||||
size_t outputSampleCount = outFrameCount * 2;
|
||||
size_t inFrameCount = (outFrameCount*mInSampleRate)/mSampleRate;
|
||||
|
||||
// ALOGE("starting resample %d frames, inputIndex=%d, phaseFraction=%d, phaseIncrement=%d\n",
|
||||
// ALOGE("starting resample %d frames, inputIndex=%d, phaseFraction=%d, phaseIncrement=%d",
|
||||
// outFrameCount, inputIndex, phaseFraction, phaseIncrement);
|
||||
|
||||
while (outputIndex < outputSampleCount) {
|
||||
@@ -197,7 +197,7 @@ void AudioResamplerOrder1::resampleStereo16(int32_t* out, size_t outFrameCount,
|
||||
goto resampleStereo16_exit;
|
||||
}
|
||||
|
||||
// ALOGE("New buffer fetched: %d frames\n", mBuffer.frameCount);
|
||||
// ALOGE("New buffer fetched: %d frames", mBuffer.frameCount);
|
||||
if (mBuffer.frameCount > inputIndex) break;
|
||||
|
||||
inputIndex -= mBuffer.frameCount;
|
||||
@@ -211,7 +211,7 @@ void AudioResamplerOrder1::resampleStereo16(int32_t* out, size_t outFrameCount,
|
||||
|
||||
// handle boundary case
|
||||
while (inputIndex == 0) {
|
||||
// ALOGE("boundary case\n");
|
||||
// ALOGE("boundary case");
|
||||
out[outputIndex++] += vl * Interp(mX0L, in[0], phaseFraction);
|
||||
out[outputIndex++] += vr * Interp(mX0R, in[1], phaseFraction);
|
||||
Advance(&inputIndex, &phaseFraction, phaseIncrement);
|
||||
@@ -220,7 +220,7 @@ void AudioResamplerOrder1::resampleStereo16(int32_t* out, size_t outFrameCount,
|
||||
}
|
||||
|
||||
// process input samples
|
||||
// ALOGE("general case\n");
|
||||
// ALOGE("general case");
|
||||
|
||||
#ifdef ASM_ARM_RESAMP1 // asm optimisation for ResamplerOrder1
|
||||
if (inputIndex + 2 < mBuffer.frameCount) {
|
||||
@@ -242,7 +242,7 @@ void AudioResamplerOrder1::resampleStereo16(int32_t* out, size_t outFrameCount,
|
||||
Advance(&inputIndex, &phaseFraction, phaseIncrement);
|
||||
}
|
||||
|
||||
// ALOGE("loop done - outputIndex=%d, inputIndex=%d\n", outputIndex, inputIndex);
|
||||
// ALOGE("loop done - outputIndex=%d, inputIndex=%d", outputIndex, inputIndex);
|
||||
|
||||
// if done with buffer, save samples
|
||||
if (inputIndex >= mBuffer.frameCount) {
|
||||
@@ -259,7 +259,7 @@ void AudioResamplerOrder1::resampleStereo16(int32_t* out, size_t outFrameCount,
|
||||
}
|
||||
}
|
||||
|
||||
// ALOGE("output buffer full - outputIndex=%d, inputIndex=%d\n", outputIndex, inputIndex);
|
||||
// ALOGE("output buffer full - outputIndex=%d, inputIndex=%d", outputIndex, inputIndex);
|
||||
|
||||
resampleStereo16_exit:
|
||||
// save state
|
||||
@@ -280,7 +280,7 @@ void AudioResamplerOrder1::resampleMono16(int32_t* out, size_t outFrameCount,
|
||||
size_t outputSampleCount = outFrameCount * 2;
|
||||
size_t inFrameCount = (outFrameCount*mInSampleRate)/mSampleRate;
|
||||
|
||||
// ALOGE("starting resample %d frames, inputIndex=%d, phaseFraction=%d, phaseIncrement=%d\n",
|
||||
// ALOGE("starting resample %d frames, inputIndex=%d, phaseFraction=%d, phaseIncrement=%d",
|
||||
// outFrameCount, inputIndex, phaseFraction, phaseIncrement);
|
||||
while (outputIndex < outputSampleCount) {
|
||||
// buffer is empty, fetch a new one
|
||||
@@ -292,7 +292,7 @@ void AudioResamplerOrder1::resampleMono16(int32_t* out, size_t outFrameCount,
|
||||
mPhaseFraction = phaseFraction;
|
||||
goto resampleMono16_exit;
|
||||
}
|
||||
// ALOGE("New buffer fetched: %d frames\n", mBuffer.frameCount);
|
||||
// ALOGE("New buffer fetched: %d frames", mBuffer.frameCount);
|
||||
if (mBuffer.frameCount > inputIndex) break;
|
||||
|
||||
inputIndex -= mBuffer.frameCount;
|
||||
@@ -304,7 +304,7 @@ void AudioResamplerOrder1::resampleMono16(int32_t* out, size_t outFrameCount,
|
||||
|
||||
// handle boundary case
|
||||
while (inputIndex == 0) {
|
||||
// ALOGE("boundary case\n");
|
||||
// ALOGE("boundary case");
|
||||
int32_t sample = Interp(mX0L, in[0], phaseFraction);
|
||||
out[outputIndex++] += vl * sample;
|
||||
out[outputIndex++] += vr * sample;
|
||||
@@ -314,7 +314,7 @@ void AudioResamplerOrder1::resampleMono16(int32_t* out, size_t outFrameCount,
|
||||
}
|
||||
|
||||
// process input samples
|
||||
// ALOGE("general case\n");
|
||||
// ALOGE("general case");
|
||||
|
||||
#ifdef ASM_ARM_RESAMP1 // asm optimisation for ResamplerOrder1
|
||||
if (inputIndex + 2 < mBuffer.frameCount) {
|
||||
@@ -337,7 +337,7 @@ void AudioResamplerOrder1::resampleMono16(int32_t* out, size_t outFrameCount,
|
||||
}
|
||||
|
||||
|
||||
// ALOGE("loop done - outputIndex=%d, inputIndex=%d\n", outputIndex, inputIndex);
|
||||
// ALOGE("loop done - outputIndex=%d, inputIndex=%d", outputIndex, inputIndex);
|
||||
|
||||
// if done with buffer, save samples
|
||||
if (inputIndex >= mBuffer.frameCount) {
|
||||
@@ -353,7 +353,7 @@ void AudioResamplerOrder1::resampleMono16(int32_t* out, size_t outFrameCount,
|
||||
}
|
||||
}
|
||||
|
||||
// ALOGE("output buffer full - outputIndex=%d, inputIndex=%d\n", outputIndex, inputIndex);
|
||||
// ALOGE("output buffer full - outputIndex=%d, inputIndex=%d", outputIndex, inputIndex);
|
||||
|
||||
resampleMono16_exit:
|
||||
// save state
|
||||
|
||||
@@ -99,7 +99,7 @@ void AudioResamplerCubic::resampleStereo16(int32_t* out, size_t outFrameCount,
|
||||
if (mBuffer.raw == NULL)
|
||||
goto save_state; // ugly, but efficient
|
||||
in = mBuffer.i16;
|
||||
// ALOGW("New buffer: offset=%p, frames=%d\n", mBuffer.raw, mBuffer.frameCount);
|
||||
// ALOGW("New buffer: offset=%p, frames=%d", mBuffer.raw, mBuffer.frameCount);
|
||||
}
|
||||
|
||||
// advance sample state
|
||||
@@ -133,7 +133,7 @@ void AudioResamplerCubic::resampleMono16(int32_t* out, size_t outFrameCount,
|
||||
provider->getNextBuffer(&mBuffer);
|
||||
if (mBuffer.raw == NULL)
|
||||
return;
|
||||
// ALOGW("New buffer: offset=%p, frames=%d\n", mBuffer.raw, mBuffer.frameCount);
|
||||
// ALOGW("New buffer: offset=%p, frames=%d", mBuffer.raw, mBuffer.frameCount);
|
||||
}
|
||||
int16_t *in = mBuffer.i16;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user