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

Commit 30d80595 authored by Ricardo Cerqueira's avatar Ricardo Cerqueira Committed by Gerrit Code Review
Browse files

Merge "Create Kineto-compatible AudioTrack::set and AudioRecord::set methods." into gb-release-7.2

parents 2746af1b e8d7e31d
Loading
Loading
Loading
Loading
+34 −0
Original line number Diff line number Diff line
@@ -146,6 +146,40 @@ AudioRecord::~AudioRecord()
    }
}

#ifdef USE_KINETO_COMPATIBILITY
// another hack, this time for a Froyo-compatible AudioRecord::set method
extern "C" status_t _ZN7android11AudioRecord3setEijijijPFviPvS1_ES1_ibi(
        AudioRecord *This,
        int inputSource,
        uint32_t sampleRate,
        int format,
        uint32_t channels,
        int frameCount,
        uint32_t flags,
        AudioRecord::callback_t,
        void* user,
        int notificationFrames,
        bool threadCanCallJava,
        int sessionId);
extern "C" status_t _ZN7android11AudioRecord3setEijijijPFviPvS1_ES1_ib(
        AudioRecord *This,
        int inputSource,
        uint32_t sampleRate,
        int format,
        uint32_t channels,
        int frameCount,
        uint32_t flags,
        AudioRecord::callback_t cbf,
        void* user,
        int notificationFrames,
        bool threadCanCallJava)
{
    return _ZN7android11AudioRecord3setEijijijPFviPvS1_ES1_ibi(
        This, inputSource, sampleRate, format, channels, frameCount,
        flags, cbf, user, notificationFrames, threadCanCallJava, 0);
}
#endif

status_t AudioRecord::set(
        int inputSource,
        uint32_t sampleRate,
+36 −0
Original line number Diff line number Diff line
@@ -164,6 +164,42 @@ AudioTrack::~AudioTrack()
    }
}

#ifdef USE_KINETO_COMPATIBILITY
// another hack, this time for a Froyo-compatible AudioTrack::set method
extern "C" status_t _ZN7android10AudioTrack3setEijiiijPFviPvS1_ES1_iRKNS_2spINS_7IMemoryEEEbi(
        AudioTrack *This,
        int streamType,
        uint32_t sampleRate,
        int format,
        int channels,
        int frameCount,
        uint32_t flags,
        AudioTrack::callback_t cbf,
        void* user,
        int notificationFrames,
        const sp<IMemory>& sharedBuffer,
        bool threadCanCallJava,
        int sessionId);
extern "C" status_t _ZN7android10AudioTrack3setEijiiijPFviPvS1_ES1_iRKNS_2spINS_7IMemoryEEEb(
        AudioTrack *This,
        int streamType,
        uint32_t sampleRate,
        int format,
        int channels,
        int frameCount,
        uint32_t flags,
        AudioTrack::callback_t cbf,
        void* user,
        int notificationFrames,
        const sp<IMemory>& sharedBuffer,
        bool threadCanCallJava)
{
    return _ZN7android10AudioTrack3setEijiiijPFviPvS1_ES1_iRKNS_2spINS_7IMemoryEEEbi(
        This, streamType, sampleRate, format, channels, frameCount, flags, cbf,
        user, notificationFrames, sharedBuffer, threadCanCallJava, 0);
}
#endif

status_t AudioTrack::set(
        int streamType,
        uint32_t sampleRate,