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

Commit 3ab8d66a authored by Glenn Kasten's avatar Glenn Kasten
Browse files

Rename symbols to be more consistent

Bug: 37153050
Test: builds OK
Change-Id: I7e55a03ca8e1f22901db6c8f6f2ad32e4c95a0cd
parent 8ae038e4
Loading
Loading
Loading
Loading
+5 −3
Original line number Diff line number Diff line
@@ -286,7 +286,7 @@ private:
        process_hook_t  hook;   // one of process__*, never NULL
        int32_t         *outputTemp;
        int32_t         *resampleTemp;
        NBLog::Writer*  mLog;
        NBLog::Writer*  mNBLogWriter;   // associated NBLog::Writer or &mDummyLog
        int32_t         reserved[1];
        // FIXME allocate dynamically to save some memory when maxNumTracks < MAX_NUM_TRACKS
        track_t         tracks[MAX_NUM_TRACKS] __attribute__((aligned(32)));
@@ -301,9 +301,11 @@ private:

    const uint32_t  mSampleRate;

    NBLog::Writer   mDummyLog;
    NBLog::Writer   mDummyLogWriter;
public:
    void            setLog(NBLog::Writer* log);
    // Called by FastMixer to inform AudioMixer of it's associated NBLog::Writer.
    // FIXME It would be safer to use TLS for this, so we don't accidentally use wrong one.
    void            setNBLogWriter(NBLog::Writer* log);
private:
    state_t         mState __attribute__((aligned(32)));

+3 −3
Original line number Diff line number Diff line
@@ -115,7 +115,7 @@ AudioMixer::AudioMixer(size_t frameCount, uint32_t sampleRate, uint32_t maxNumTr
    mState.hook         = process__nop;
    mState.outputTemp   = NULL;
    mState.resampleTemp = NULL;
    mState.mLog         = &mDummyLog;
    mState.mNBLogWriter = &mDummyLogWriter;
    // mState.reserved

    // FIXME Most of the following initialization is probably redundant since
@@ -146,9 +146,9 @@ AudioMixer::~AudioMixer()
    delete [] mState.resampleTemp;
}

void AudioMixer::setLog(NBLog::Writer *log)
void AudioMixer::setNBLogWriter(NBLog::Writer *logWriter)
{
    mState.mLog = log;
    mState.mNBLogWriter = logWriter;
}

static inline audio_format_t selectMixerInFormat(audio_format_t inputFormat __unused) {
+1 −1
Original line number Diff line number Diff line
@@ -57,7 +57,7 @@ const FastThreadState *FastCapture::poll()
    return mSQ.poll();
}

void FastCapture::setLog(NBLog::Writer *logWriter __unused)
void FastCapture::setNBLogWriter(NBLog::Writer *logWriter __unused)
{
}

+1 −1
Original line number Diff line number Diff line
@@ -39,7 +39,7 @@ private:

    // callouts
    virtual const FastThreadState *poll();
    virtual void setLog(NBLog::Writer *logWriter);
    virtual void setNBLogWriter(NBLog::Writer *logWriter);
    virtual void onIdle();
    virtual void onExit();
    virtual bool isSubClassCommand(FastThreadState::Command command);
+5 −2
Original line number Diff line number Diff line
@@ -101,10 +101,12 @@ const FastThreadState *FastMixer::poll()
    return mSQ.poll();
}

void FastMixer::setLog(NBLog::Writer *logWriter)
void FastMixer::setNBLogWriter(NBLog::Writer *logWriter)
{
    // FIXME If mMixer is set or changed prior to this, we don't inform correctly.
    //       Should cache logWriter and re-apply it at the assignment to mMixer.
    if (mMixer != NULL) {
        mMixer->setLog(logWriter);
        mMixer->setNBLogWriter(logWriter);
    }
}

@@ -188,6 +190,7 @@ void FastMixer::onStateChange()
            //       implementation; it would be better to have normal mixer allocate for us
            //       to avoid blocking here and to prevent possible priority inversion
            mMixer = new AudioMixer(frameCount, mSampleRate, FastMixerState::sMaxFastTracks);
            // FIXME See the other FIXME at FastMixer::setNBLogWriter()
            const size_t mixerFrameSize = mSinkChannelCount
                    * audio_bytes_per_sample(mMixerBufferFormat);
            mMixerBufferSize = mixerFrameSize * frameCount;
Loading