diff options
author | Ricardo Cerqueira <cyanogenmod@cerqueira.org> | 2012-03-13 03:24:01 +0300 |
---|---|---|
committer | Gerrit Code Review <gerrit@review.cyanogenmod.com> | 2012-03-13 03:24:01 +0300 |
commit | 30d805950f2daac1c6bb5419542a797d75a601fe (patch) | |
tree | 2ff3eea2ba1cf71addb8916265e336eb1845809c | |
parent | 2746af1b1b6156b967bc5a1c5ba00b68b3f3bd02 (diff) | |
parent | e8d7e31d20624e95907b01e8234b4e4ce0506286 (diff) | |
download | frameworks_base-30d805950f2daac1c6bb5419542a797d75a601fe.zip frameworks_base-30d805950f2daac1c6bb5419542a797d75a601fe.tar.gz frameworks_base-30d805950f2daac1c6bb5419542a797d75a601fe.tar.bz2 |
Merge "Create Kineto-compatible AudioTrack::set and AudioRecord::set methods." into gb-release-7.2
-rw-r--r-- | media/libmedia/AudioRecord.cpp | 34 | ||||
-rw-r--r-- | media/libmedia/AudioTrack.cpp | 36 |
2 files changed, 70 insertions, 0 deletions
diff --git a/media/libmedia/AudioRecord.cpp b/media/libmedia/AudioRecord.cpp index 556e9ef..c0ee5b0 100644 --- a/media/libmedia/AudioRecord.cpp +++ b/media/libmedia/AudioRecord.cpp @@ -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, diff --git a/media/libmedia/AudioTrack.cpp b/media/libmedia/AudioTrack.cpp index d404f9e..1c4a8d3 100644 --- a/media/libmedia/AudioTrack.cpp +++ b/media/libmedia/AudioTrack.cpp @@ -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, |