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

Commit 6ff474ed authored by Glenn Kasten's avatar Glenn Kasten Committed by Android (Google) Code Review
Browse files

Merge "Pull out FastCaptureDumpState and FastMixerDumpState"

parents 5e2d2792 04333cdc
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -77,8 +77,10 @@ LOCAL_32_BIT_ONLY := true
LOCAL_SRC_FILES += \
    AudioWatchdog.cpp        \
    FastCapture.cpp          \
    FastCaptureDumpState.cpp \
    FastCaptureState.cpp     \
    FastMixer.cpp            \
    FastMixerDumpState.cpp   \
    FastMixerState.cpp       \
    FastThread.cpp           \
    FastThreadDumpState.cpp  \
+0 −9
Original line number Diff line number Diff line
@@ -210,13 +210,4 @@ void FastCapture::onWork()
    }
}

FastCaptureDumpState::FastCaptureDumpState() : FastThreadDumpState(),
    mReadSequence(0), mFramesRead(0), mReadErrors(0), mSampleRate(0), mFrameCount(0)
{
}

FastCaptureDumpState::~FastCaptureDumpState()
{
}

}   // namespace android
+1 −13
Original line number Diff line number Diff line
@@ -20,24 +20,12 @@
#include "FastThread.h"
#include "StateQueue.h"
#include "FastCaptureState.h"
#include "FastThreadDumpState.h"
#include "FastCaptureDumpState.h"

namespace android {

typedef StateQueue<FastCaptureState> FastCaptureStateQueue;

struct FastCaptureDumpState : FastThreadDumpState {
    FastCaptureDumpState();
    /*virtual*/ ~FastCaptureDumpState();

    // FIXME by renaming, could pull up many of these to FastThreadDumpState
    uint32_t mReadSequence;     // incremented before and after each read()
    uint32_t mFramesRead;       // total number of frames read successfully
    uint32_t mReadErrors;       // total number of read() errors
    uint32_t mSampleRate;
    size_t   mFrameCount;
};

class FastCapture : public FastThread {

public:
+30 −0
Original line number Diff line number Diff line
/*
 * Copyright (C) 2014 The Android Open Source Project
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

#include "FastCaptureDumpState.h"

namespace android {

FastCaptureDumpState::FastCaptureDumpState() : FastThreadDumpState(),
    mReadSequence(0), mFramesRead(0), mReadErrors(0), mSampleRate(0), mFrameCount(0)
{
}

FastCaptureDumpState::~FastCaptureDumpState()
{
}

}   // android
+40 −0
Original line number Diff line number Diff line
/*
 * Copyright (C) 2014 The Android Open Source Project
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

#ifndef ANDROID_AUDIO_FAST_CAPTURE_DUMP_STATE_H
#define ANDROID_AUDIO_FAST_CAPTURE_DUMP_STATE_H

#include <stdint.h>
#include "Configuration.h"
#include "FastThreadDumpState.h"

namespace android {

struct FastCaptureDumpState : FastThreadDumpState {
    FastCaptureDumpState();
    /*virtual*/ ~FastCaptureDumpState();

    // FIXME by renaming, could pull up many of these to FastThreadDumpState
    uint32_t mReadSequence;     // incremented before and after each read()
    uint32_t mFramesRead;       // total number of frames read successfully
    uint32_t mReadErrors;       // total number of read() errors
    uint32_t mSampleRate;
    size_t   mFrameCount;
};

}   // android

#endif  // ANDROID_AUDIO_FAST_CAPTURE_DUMP_STATE_H
Loading