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

Commit c64a1787 authored by Jean-Baptiste Queru's avatar Jean-Baptiste Queru Committed by android code review
Browse files

Merge "Fix initialization of audio mixer track resources for MIPS."

parents e28df5b9 3c0a0e85
Loading
Loading
Loading
Loading
+5 −1
Original line number Diff line number Diff line
@@ -93,8 +93,12 @@ bool AudioMixer::isMultichannelCapable = false;

effect_descriptor_t AudioMixer::dwnmFxDesc;

// Ensure mConfiguredNames bitmask is initialized properly on all architectures.
// The value of 1 << x is undefined in C when x >= 32.

AudioMixer::AudioMixer(size_t frameCount, uint32_t sampleRate, uint32_t maxNumTracks)
    :   mTrackNames(0), mConfiguredNames((1 << maxNumTracks) - 1), mSampleRate(sampleRate)
    :   mTrackNames(0), mConfiguredNames((maxNumTracks >= 32 ? 0 : 1 << maxNumTracks) - 1),
        mSampleRate(sampleRate)
{
    // AudioMixer is not yet capable of multi-channel beyond stereo
    COMPILE_TIME_ASSERT_FUNCTION_SCOPE(2 == MAX_NUM_CHANNELS);