Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 012a4aee authored by Andy Hung's avatar Andy Hung Committed by Android Git Automerger
Browse files

am 0deae746: am 42193b96: Merge "Fix FastMixer high bit depth Hal support" into mnc-dev

* commit '0deae746':
  Fix FastMixer high bit depth Hal support
parents 3e7326aa 0deae746
Loading
Loading
Loading
Loading
+4 −0
Original line number Original line Diff line number Diff line
@@ -177,6 +177,10 @@ void FastMixer::onStateChange()
        free(mSinkBuffer);
        free(mSinkBuffer);
        mSinkBuffer = NULL;
        mSinkBuffer = NULL;
        if (frameCount > 0 && mSampleRate > 0) {
        if (frameCount > 0 && mSampleRate > 0) {
            // The mixer produces either 16 bit PCM or float output, select
            // float output if the HAL supports higher than 16 bit precision.
            mMixerBufferFormat = mFormat.mFormat == AUDIO_FORMAT_PCM_16_BIT ?
                    AUDIO_FORMAT_PCM_16_BIT : AUDIO_FORMAT_PCM_FLOAT;
            // FIXME new may block for unbounded time at internal mutex of the heap
            // FIXME new may block for unbounded time at internal mutex of the heap
            //       implementation; it would be better to have normal mixer allocate for us
            //       implementation; it would be better to have normal mixer allocate for us
            //       to avoid blocking here and to prevent possible priority inversion
            //       to avoid blocking here and to prevent possible priority inversion