Demo entry 6358613



Submitted by wo on Apr 26, 2017 at 10:52
Language: C++. Code size: 721 Bytes.

void AudioFlinger::MixerThread::threadLoop_mix()
    // mix buffers...
    mAudioMixer->process();               //調用混音
    mCurrentWriteLength = mSinkBufferSize; //混音的數據量
    // increase sleep time progressively when application underrun condition clears.
    // Only increase sleep time if the mixer is ready for two consecutive times to avoid
    // that a steady state of alternating ready/not ready conditions keeps the sleep time
    // such that we would underrun the audio HAL.
    if ((mSleepTimeUs == 0) && (sleepTimeShift > 0)) {
    mSleepTimeUs = 0;
    mStandbyTimeNs = systemTime() + mStandbyDelayNs;
    //TODO: delay standby when effects have a tail


This snippet took 0.00 seconds to highlight.

Back to the Entry List or Home.

Delete this entry (admin only).