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

Commit 7719f633 authored by John Grossman's avatar John Grossman
Browse files

Update method sigs.

Update the getNextBuffer signatures to have an additional (but
ignorable) parameter used to implement timed audio output.

Change-Id: Icb98e4af4d136c234ae8c5cbb4a5de4350b436bb
parent 49f00040
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -199,7 +199,7 @@ status_t VideoEditorSRC::read(
    return OK;
}

status_t VideoEditorSRC::getNextBuffer(AudioBufferProvider::Buffer *pBuffer) {
status_t VideoEditorSRC::getNextBuffer(AudioBufferProvider::Buffer *pBuffer, int64_t pts) {
    ALOGV("getNextBuffer %d, chan = %d", pBuffer->frameCount, mChannelCnt);
    uint32_t done = 0;
    uint32_t want = pBuffer->frameCount * mChannelCnt * 2;
+1 −1
Original line number Diff line number Diff line
@@ -35,7 +35,7 @@ public:
    virtual status_t read (
                MediaBuffer **buffer, const ReadOptions *options = NULL);

    virtual status_t getNextBuffer(Buffer* buffer);
    virtual status_t getNextBuffer(Buffer* buffer, int64_t pts);
    virtual void releaseBuffer(Buffer* buffer);

    // Sampling freqencies
+2 −2
Original line number Diff line number Diff line
@@ -26,7 +26,7 @@ struct VideoEditorResampler : public AudioBufferProvider {

    public:

        virtual status_t getNextBuffer(Buffer* buffer);
        virtual status_t getNextBuffer(Buffer* buffer, int64_t pts);
        virtual void releaseBuffer(Buffer* buffer);

    enum { //Sampling freq
@@ -53,7 +53,7 @@ struct VideoEditorResampler : public AudioBufferProvider {

#define MAX_SAMPLEDURATION_FOR_CONVERTION 40 //ms

status_t VideoEditorResampler::getNextBuffer(AudioBufferProvider::Buffer *pBuffer) {
status_t VideoEditorResampler::getNextBuffer(AudioBufferProvider::Buffer *pBuffer, int64_t pts) {

    uint32_t dataSize = pBuffer->frameCount * this->nbChannels * sizeof(int16_t);
    mTmpInBuffer = (int16_t*)malloc(dataSize);